Class: Document::Data
- Inherits:
-
Object
- Object
- Document::Data
- Defined in:
- lib/document/data.rb
Overview
Input or output data
value - the data value or a (possibly nested) list of data values
Instance Attribute Summary collapse
-
#annotation ⇒ Object
Returns the value of attribute annotation.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
-
#initialize(value = nil, annotation = nil) ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize(value = nil, annotation = nil) ⇒ Data
Returns a new instance of Data.
9 10 11 12 |
# File 'lib/document/data.rb', line 9 def initialize(value=nil, annotation=nil) @value = value @annotation = annotation end |
Instance Attribute Details
#annotation ⇒ Object
Returns the value of attribute annotation.
7 8 9 |
# File 'lib/document/data.rb', line 7 def annotation @annotation end |
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/document/data.rb', line 7 def value @value end |
Instance Method Details
#==(other) ⇒ Object
18 19 20 |
# File 'lib/document/data.rb', line 18 def ==(other) @value == other.value and @annotation == other.annotation end |
#eql?(other) ⇒ Boolean
14 15 16 |
# File 'lib/document/data.rb', line 14 def eql?(other) @value.eql?(other.value) and @annotation.eql?(other.annotation) end |