Module: QuestionMarkMethod::ClassMethods

Defined in:
lib/question_mark_method.rb

Instance Method Summary collapse

Instance Method Details

#add_question_mark_methods(options) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/question_mark_method.rb', line 15

def add_question_mark_methods(options)
  self.class_eval do
    options.each do |new_method_name, old_method_name|
      define_method new_method_name do
        return_boolean_value_of_attribute_related_with(old_method_name.to_s)
      end
    end
  end
end