Class: ClickSession::ClickSessionProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/click_session/click_session_processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(click_session, web_runner_processor, notifier, options = {}) ⇒ ClickSessionProcessor

Returns a new instance of ClickSessionProcessor.



8
9
10
11
12
13
14
# File 'lib/click_session/click_session_processor.rb', line 8

def initialize(click_session, web_runner_processor, notifier, options = {})
  @click_session = click_session
  @web_runner_processor = web_runner_processor
  @notifier = notifier
  @screenshot_enabled = options[:screenshot_enabled] || false
  @screenshot_options = options[:screenshot_options] || nil
end

Instance Attribute Details

#click_sessionObject

Returns the value of attribute click_session.



5
6
7
# File 'lib/click_session/click_session_processor.rb', line 5

def click_session
  @click_session
end

#notifierObject (readonly)

Returns the value of attribute notifier.



6
7
8
# File 'lib/click_session/click_session_processor.rb', line 6

def notifier
  @notifier
end

#screenshot_enabledObject (readonly)

Returns the value of attribute screenshot_enabled.



6
7
8
# File 'lib/click_session/click_session_processor.rb', line 6

def screenshot_enabled
  @screenshot_enabled
end

#screenshot_optionsObject (readonly)

Returns the value of attribute screenshot_options.



6
7
8
# File 'lib/click_session/click_session_processor.rb', line 6

def screenshot_options
  @screenshot_options
end

#web_runner_processorObject (readonly)

Returns the value of attribute web_runner_processor.



6
7
8
# File 'lib/click_session/click_session_processor.rb', line 6

def web_runner_processor
  @web_runner_processor
end

Instance Method Details

#processObject



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/click_session/click_session_processor.rb', line 16

def process
  validate_screenshot_configuration

  begin
    process_provided_steps_in_session
  rescue TooManyRetriesError => e
    take_care_of_failed_session
    raise e
  end

  click_session
end