module ProjectStore::Entity::PropertyBinder
Public Instance Methods
mandatory_properties()
click to toggle source
# File lib/project_store/entity/property_binder.rb, line 33 def mandatory_properties @mandatory_properties ||= [] end
mandatory_property(*properties)
click to toggle source
# File lib/project_store/entity/property_binder.rb, line 37 def mandatory_property(*properties) properties.each do |property| mandatory_properties << property end end
yaml_accessor(*yaml_properties)
click to toggle source
# File lib/project_store/entity/property_binder.rb, line 6 def yaml_accessor(*yaml_properties) yaml_properties.each do |yaml_property| yaml_reader yaml_property yaml_writer yaml_property end end
yaml_reader(*yaml_properties)
click to toggle source
# File lib/project_store/entity/property_binder.rb, line 13 def yaml_reader(*yaml_properties) yaml_properties.each do |yaml_property| self.class_eval do define_method yaml_property do self[yaml_property] end end end end
yaml_writer(*yaml_properties)
click to toggle source
# File lib/project_store/entity/property_binder.rb, line 23 def yaml_writer(*yaml_properties) yaml_properties.each do |yaml_property| self.class_eval do define_method "#{yaml_property}=" do |val| self[yaml_property] = val end end end end