Class: Agio::Data
- Inherits:
-
Object
- Object
- Agio::Data
- Defined in:
- lib/agio/data.rb
Overview
A simple wrapper around string data in an HTML document.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Used mostly for testing.
-
#initialize(value) ⇒ Data
constructor
A new instance of Data.
- #inspect ⇒ Object
- #to_s ⇒ Object
- #to_str ⇒ Object
Constructor Details
#initialize(value) ⇒ Data
Returns a new instance of Data.
6 7 8 |
# File 'lib/agio/data.rb', line 6 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
10 11 12 |
# File 'lib/agio/data.rb', line 10 def value @value end |
Instance Method Details
#==(other) ⇒ Object
Used mostly for testing.
26 27 28 29 30 31 32 |
# File 'lib/agio/data.rb', line 26 def ==(other) if other.kind_of? Agio::Data self.class == other.class && value == other.value else value == other end end |
#inspect ⇒ Object
20 21 22 |
# File 'lib/agio/data.rb', line 20 def inspect %Q(#<#{self.class} #{value.inspect}>) end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/agio/data.rb', line 12 def to_s value end |
#to_str ⇒ Object
16 17 18 |
# File 'lib/agio/data.rb', line 16 def to_str value end |