Class: Rexport::DataField
- Inherits:
-
Object
- Object
- Rexport::DataField
- Includes:
- Comparable
- Defined in:
- lib/rexport/data_field.rb
Instance Attribute Summary collapse
-
#method ⇒ Object
Returns the value of attribute method.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #<=>(rf) ⇒ Object
-
#initialize(name, options = {}) ⇒ DataField
constructor
Stores the name and method of the export data item.
Constructor Details
#initialize(name, options = {}) ⇒ DataField
Stores the name and method of the export data item
7 8 9 10 11 |
# File 'lib/rexport/data_field.rb', line 7 def initialize(name, = {}) self.name = name.to_s self.method = [:method].blank? ? self.name : [:method].to_s self.type = [:type] end |
Instance Attribute Details
#method ⇒ Object
Returns the value of attribute method.
4 5 6 |
# File 'lib/rexport/data_field.rb', line 4 def method @method end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/rexport/data_field.rb', line 4 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/rexport/data_field.rb', line 4 def type @type end |
Instance Method Details
#<=>(rf) ⇒ Object
13 14 15 |
# File 'lib/rexport/data_field.rb', line 13 def <=>(rf) self.name <=> rf.name end |