Examveda

Which of the following is NOT a valid method definition syntax in Ruby?

A. def method_name; end

B. define method_name; end

C. define_method(:method_name) { }; end

D. def self.method_name; end

Answer: Option B


This Question Belongs to Ruby Programming >> Methods In Ruby

Join The Discussion

Related Questions on Methods in Ruby