Class: RoxClient::RSpec::TestPayload

Inherits:
Object
  • Object
show all
Defined in:
lib/rox-client-rspec/test_payload.rb

Defined Under Namespace

Classes: Error

Instance Method Summary collapse

Constructor Details

#initialize(run) ⇒ TestPayload

Returns a new instance of TestPayload.



10
11
12
# File 'lib/rox-client-rspec/test_payload.rb', line 10

def initialize run
  @run = run
end

Instance Method Details

#to_h(options = {}) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/rox-client-rspec/test_payload.rb', line 14

def to_h options = {}
  case options[:version]
  when 0
    { 'r' => [ @run.to_h(options) ] }
  else # version 1 by default
    @run.to_h options
  end
end