Class: BrightcoveService::Video

Inherits:
Base
  • Object
show all
Defined in:
lib/brightcove_service/video.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#add_error, #error_message

Constructor Details

#initialize(params) ⇒ Video

Returns a new instance of Video.



10
11
12
# File 'lib/brightcove_service/video.rb', line 10

def initialize(params)
  @params = params
end

Instance Attribute Details

#brightcove_videoObject (readonly)

Returns the value of attribute brightcove_video.



7
8
9
# File 'lib/brightcove_service/video.rb', line 7

def brightcove_video
  @brightcove_video
end

#paramsObject (readonly)

Returns the value of attribute params.



7
8
9
# File 'lib/brightcove_service/video.rb', line 7

def params
  @params
end

#resultObject (readonly)

Returns the value of attribute result.



7
8
9
# File 'lib/brightcove_service/video.rb', line 7

def result
  @result
end

Instance Method Details

#callObject



14
15
16
17
18
19
20
# File 'lib/brightcove_service/video.rb', line 14

def call
  valid? &&
    create_videos_on_brightcove &&
    set_result
rescue StandardError => e
  add_error(e)
end