Class: TextRecord::YAMLAttribute

Inherits:
Attribute show all
Defined in:
lib/text_record/attribute.rb

Instance Attribute Summary

Attributes inherited from Attribute

#name, #options

Instance Method Summary collapse

Methods inherited from Attribute

for_options, #initialize

Constructor Details

This class inherits a constructor from TextRecord::Attribute

Instance Method Details

#parse(obj) ⇒ Object



16
17
18
# File 'lib/text_record/attribute.rb', line 16

def parse(obj)
  obj.instance_variable_set("@#{name.to_s.underscore}".to_sym, obj.yml[name.to_s.camelcase])
end