Class: Kinu::ResourceBase
- Inherits:
-
Object
- Object
- Kinu::ResourceBase
- Defined in:
- lib/kinu/resource_base.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, id, options = {}) ⇒ ResourceBase
constructor
A new instance of ResourceBase.
- #path(options) ⇒ Object
- #uri(options) ⇒ Object
Constructor Details
#initialize(name, id, options = {}) ⇒ ResourceBase
8 9 10 |
# File 'lib/kinu/resource_base.rb', line 8 def initialize(name, id, = {}) @name, @id, = name, id, end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/kinu/resource_base.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/kinu/resource_base.rb', line 6 def name @name end |
Instance Method Details
#path(options) ⇒ Object
19 20 21 22 23 |
# File 'lib/kinu/resource_base.rb', line 19 def path() format = (.delete(:format) || :jpg) geometry = Geometry.new() build_path(geometry, format) end |
#uri(options) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/kinu/resource_base.rb', line 12 def uri() = .delete(:timestamp) format = (.delete(:format) || :jpg) geometry = Geometry.new() build_uri(geometry, format, ) end |