Class: Id
- Inherits:
-
Object
- Object
- Id
- Defined in:
- lib/r43/id.rb
Overview
Implements an id object. This object encapsulates the 43 Things id string format of “tag:43things.com:joshp:entry:33”. Currently, intended to be constructed only by other domain objects.
Instance Attribute Summary collapse
-
#int_value ⇒ Object
Returns the value of attribute int_value.
-
#string_value ⇒ Object
Returns the value of attribute string_value.
Class Method Summary collapse
-
.from_xml(xml) ⇒ Object
Builds an Id object from the format “<id>tag:43things.com:joshp:entry:33</id>”.
Instance Method Summary collapse
-
#initialize ⇒ Id
constructor
A new instance of Id.
- #to_i ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Id
Returns a new instance of Id.
13 14 15 16 |
# File 'lib/r43/id.rb', line 13 def initialize() # just to initialize the object, we'll always feed the attributes # in some other way end |
Instance Attribute Details
#int_value ⇒ Object
Returns the value of attribute int_value.
11 12 13 |
# File 'lib/r43/id.rb', line 11 def int_value @int_value end |
#string_value ⇒ Object
Returns the value of attribute string_value.
11 12 13 |
# File 'lib/r43/id.rb', line 11 def string_value @string_value end |
Class Method Details
Instance Method Details
#to_i ⇒ Object
18 19 20 |
# File 'lib/r43/id.rb', line 18 def to_i() @int_value end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/r43/id.rb', line 22 def to_s() @string_value end |