0
people of this house are very helpful. please help I can solve this question
Fill in the blanks to create a Dog class with a class variable "legs" and a class method "legs" that returns the value of the class variable. Dog @@legs = 4 def .legs end end puts Dog.legs
3 Respuestas
+ 2
class Dog
@@legs = 4
def self.legs
@@legs
end
end
puts Dog.legs
0
"Rearrange" the code to take the content of sample.txt and append it to dest.txt. ruby
- 1
You need to define methods name and make puts or return statement of legs