Class: InsoundApi::ObjectBase
- Inherits:
-
Object
- Object
- InsoundApi::ObjectBase
- Defined in:
- lib/insound_api/object_base.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
-
#initialize(node) ⇒ ObjectBase
constructor
A new instance of ObjectBase.
- #parse_int(selector) ⇒ Object
- #parse_str(selector) ⇒ Object
- #title ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(node) ⇒ ObjectBase
Returns a new instance of ObjectBase.
6 7 8 |
# File 'lib/insound_api/object_base.rb', line 6 def initialize(node) @node = node end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
4 5 6 |
# File 'lib/insound_api/object_base.rb', line 4 def node @node end |
Instance Method Details
#parse_int(selector) ⇒ Object
22 23 24 |
# File 'lib/insound_api/object_base.rb', line 22 def parse_int(selector) Results.parse_int(selector, node) end |
#parse_str(selector) ⇒ Object
18 19 20 |
# File 'lib/insound_api/object_base.rb', line 18 def parse_str(selector) Results.parse_str(selector, node) end |
#title ⇒ Object
14 15 16 |
# File 'lib/insound_api/object_base.rb', line 14 def title @title ||= parse_str('title') end |
#url ⇒ Object
10 11 12 |
# File 'lib/insound_api/object_base.rb', line 10 def url @url ||= parse_str('url') end |