lib/core/service_layer/model.rb
# look in attributes if a method is missing
look in attributes if a method is missing
look in attributes if a method is missing
def method_missing(method_sym, *arguments, &block)
        attribute_name = method_sym.to_s
        attribute_name = attribute_name.chop if attribute_name.ends_with?('=')
        if arguments.count > 1
          write(attribute_name, arguments)
        elsif arguments.count.positive?
          write(attribute_name, arguments.first)
        else
          sanitize(read(attribute_name))
        end
      end
def method_missing ( method_sym , * arguments , & block ) attribute_name = method_sym . to_s attribute_name = attribute_name . chop if attribute_name . ends_with? ( '=' ) if arguments . count > 1 write ( attribute_name , arguments ) elsif arguments . count . positive? write ( attribute_name , arguments . first ) else sanitize ( read ( attribute_name ) ) end end
look in attributes if a method is missing
look in attributes if a method is missing
method_sym
<not_specific>
arguments
<not_specific>
block
<not_specific>