Class: VzaarApi::Strategy::Image::Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/vzaar_api/strategy/image/abstract.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attrsObject (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_classObject (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_idObject (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

#executeObject



14
15
16
# File 'lib/vzaar_api/strategy/image/abstract.rb', line 14

def execute
  raise 'not implemented'
end

#urlObject



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