Module: Jsapi::Model::Attributes

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/jsapi/model/attributes.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object

:nodoc:



12
13
14
15
# File 'lib/jsapi/model/attributes.rb', line 12

def method_missing(*args) # :nodoc:
  name = args.first
  attribute?(name) ? self[name] : super
end

Instance Method Details

#respond_to_missing?(param1, _param2) ⇒ Boolean

:nodoc:

Returns:

  • (Boolean)


17
18
19
# File 'lib/jsapi/model/attributes.rb', line 17

def respond_to_missing?(param1, _param2) # :nodoc:
  attribute?(param1) ? true : super
end