Module: DeviceMap::Properties::DSL::ClassMethods

Defined in:
lib/device_map/properties/dsl.rb

Instance Method Summary collapse

Instance Method Details

#propertiesObject

FIXME: This method should not be public



13
14
15
# File 'lib/device_map/properties/dsl.rb', line 13

def properties
  @properties ||= {}
end

#property(name, type: :string, source_name: name) ⇒ Object



7
8
9
10
# File 'lib/device_map/properties/dsl.rb', line 7

def property(name, type: :string, source_name: name)
  attr_reader name
  properties[source_name] = Property.new(name, type, source_name)
end