Class: Elsmore::Resource
- Inherits:
-
Object
- Object
- Elsmore::Resource
- Defined in:
- lib/elsmore/resource.rb
Instance Attribute Summary collapse
-
#emitter ⇒ Object
Returns the value of attribute emitter.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(url, parent) ⇒ Resource
constructor
A new instance of Resource.
- #write!(nested_urls = false) ⇒ Object
Constructor Details
Instance Attribute Details
#emitter ⇒ Object
Returns the value of attribute emitter.
5 6 7 |
# File 'lib/elsmore/resource.rb', line 5 def emitter @emitter end |
#filename ⇒ Object
Returns the value of attribute filename.
5 6 7 |
# File 'lib/elsmore/resource.rb', line 5 def filename @filename end |
#parent ⇒ Object
Returns the value of attribute parent.
5 6 7 |
# File 'lib/elsmore/resource.rb', line 5 def parent @parent end |
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/elsmore/resource.rb', line 5 def url @url end |
Instance Method Details
#data ⇒ Object
21 22 23 |
# File 'lib/elsmore/resource.rb', line 21 def data @data ||= HTTParty.get(url.canonical_url) end |