Module: Eac::Listable::InstanceMethods

Defined in:
lib/eac/listable.rb

Constant Summary collapse

LISTABLE_INSTANCE_VALUE_METHODS =
%w(label description).freeze

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



20
21
22
23
# File 'lib/eac/listable.rb', line 20

def method_missing(name, *args, &block)
  list, method = parse_method(name)
  list && method ? list.instance_value(self).send(method) : super
end

Instance Method Details

#respond_to?(name, include_all = false) ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
28
# File 'lib/eac/listable.rb', line 25

def respond_to?(name, include_all = false)
  list, method = parse_method(name)
  list && method ? true : super
end