How can I call a static method in a Ruby module from a class that includes the module?

Viewed 22450

Is it possible to declare static methods in a module in ruby?

module Software
  def self.exit
    puts "exited"
  end
end

class Windows
  include Software

  def self.start
    puts "started"
    self.exit
  end
end

Windows.start

The example above will not print out "exited".

Is it only possible to have instance methods in a module?

4 Answers
Related