Class: VzaarApi::Strategy::Image::Abstract
- Inherits:
-
Object
- Object
- VzaarApi::Strategy::Image::Abstract
- Defined in:
- lib/vzaar_api/strategy/image/abstract.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#video_class ⇒ Object
readonly
Returns the value of attribute video_class.
-
#video_id ⇒ Object
readonly
Returns the value of attribute video_id.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(video_id, attrs, video_class) ⇒ Abstract
constructor
A new instance of Abstract.
- #url ⇒ Object
Constructor Details
#initialize(video_id, attrs, video_class) ⇒ Abstract
Returns a new instance of Abstract.
8 9 10 11 12 |
# File 'lib/vzaar_api/strategy/image/abstract.rb', line 8 def initialize(video_id, attrs, video_class) @attrs = attrs @video_id = video_id @video_class = video_class end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
6 7 8 |
# File 'lib/vzaar_api/strategy/image/abstract.rb', line 6 def attrs @attrs end |
#video_class ⇒ Object (readonly)
Returns the value of attribute video_class.
6 7 8 |
# File 'lib/vzaar_api/strategy/image/abstract.rb', line 6 def video_class @video_class end |
#video_id ⇒ Object (readonly)
Returns the value of attribute video_id.
6 7 8 |
# File 'lib/vzaar_api/strategy/image/abstract.rb', line 6 def video_id @video_id end |
Instance Method Details
#execute ⇒ Object
14 15 16 |
# File 'lib/vzaar_api/strategy/image/abstract.rb', line 14 def execute raise 'not implemented' end |
#url ⇒ Object
18 19 20 21 |
# File 'lib/vzaar_api/strategy/image/abstract.rb', line 18 def url path = File.join(video_class::ENDPOINT, video_id.to_s, "image") Lib::Api.resource_url path end |