Class: TextRecord::Attribute
- Inherits:
-
Object
- Object
- TextRecord::Attribute
- Defined in:
- lib/text_record/attribute.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, options) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(name, options) ⇒ Attribute
Returns a new instance of Attribute.
9 10 11 12 |
# File 'lib/text_record/attribute.rb', line 9 def initialize(name, ) @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/text_record/attribute.rb', line 3 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/text_record/attribute.rb', line 3 def @options end |
Class Method Details
.for_options(options) ⇒ Object
5 6 7 |
# File 'lib/text_record/attribute.rb', line 5 def self.() ([:from].eql?(:yml)) ? YAMLAttribute : FileAttribute end |