Module: Physical::PropertyReaders

Included in:
Cuboid, Location
Defined in:
lib/physical/property_readers.rb

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object (private)



9
10
11
12
13
14
15
16
17
# File 'lib/physical/property_readers.rb', line 9

def method_missing(method)
  symbolized_properties = properties.symbolize_keys
  method_name = normalize_method_name(method)
  if symbolized_properties.key?(method_name)
    symbolized_properties[method_name]
  else
    super
  end
end