Class: ProxyRb::Resource
- Inherits:
-
Object
- Object
- ProxyRb::Resource
- Defined in:
- lib/proxy_rb/resource.rb
Overview
A resource
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
Instance Method Summary collapse
-
#initialize(url) ⇒ Resource
constructor
A new instance of Resource.
-
#to_url ⇒ String
Convert resource to url.
Constructor Details
#initialize(url) ⇒ Resource
Returns a new instance of Resource.
16 17 18 |
# File 'lib/proxy_rb/resource.rb', line 16 def initialize(url) @url = Addressable::URI.parse(url) end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
8 9 10 |
# File 'lib/proxy_rb/resource.rb', line 8 def content @content end |
Instance Method Details
#to_url ⇒ String
Convert resource to url
24 25 26 |
# File 'lib/proxy_rb/resource.rb', line 24 def to_url url.to_s end |