Last Updated: February 25, 2016
·
305
· mejarc

Class vs. instance methods

class Fish
  def self.general_overview()
    return("Fish are animals that live in the sea")
  end

  def fins(bool)
    @bool = bool
  end         
end

Fish.general_overview
Fish.fins(25)
nemo = Fish.new
nemo.fins(4)
X nemo.general_overview