Method: Configurations::Configurable::ClassMethods#configurable
- Defined in:
- lib/configurations/configurable.rb
#configurable(*properties, &block) ⇒ Object
configurable can be used to set the properties which should be configurable, as well as a type which the given property should be asserted to
119 120 121 122 123 124 125 126 127 128 |
# File 'lib/configurations/configurable.rb', line 119 def configurable(*properties, &block) @configurable_properties ||= Maps::Properties.new @configurable_types ||= Maps::Types.new @configurable_blocks ||= Maps::Blocks.new type, properties = extract_type(properties) @configurable_properties.add(properties) @configurable_types.add(type, properties) @configurable_blocks.add(block, properties) end |