Class: Cucumber::Messages::Envelope
- Defined in:
- lib/cucumber/messages/envelope.rb
Overview
Represents the Envelope message in Cucumber’s message protocol.
Instance Attribute Summary collapse
-
#attachment ⇒ Object
readonly
Returns the value of attribute attachment.
-
#gherkin_document ⇒ Object
readonly
Returns the value of attribute gherkin_document.
-
#hook ⇒ Object
readonly
Returns the value of attribute hook.
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
-
#parameter_type ⇒ Object
readonly
Returns the value of attribute parameter_type.
-
#parse_error ⇒ Object
readonly
Returns the value of attribute parse_error.
-
#pickle ⇒ Object
readonly
Returns the value of attribute pickle.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#step_definition ⇒ Object
readonly
Returns the value of attribute step_definition.
-
#test_case ⇒ Object
readonly
Returns the value of attribute test_case.
-
#test_case_finished ⇒ Object
readonly
Returns the value of attribute test_case_finished.
-
#test_case_started ⇒ Object
readonly
Returns the value of attribute test_case_started.
-
#test_run_finished ⇒ Object
readonly
Returns the value of attribute test_run_finished.
-
#test_run_hook_finished ⇒ Object
readonly
Returns the value of attribute test_run_hook_finished.
-
#test_run_hook_started ⇒ Object
readonly
Returns the value of attribute test_run_hook_started.
-
#test_run_started ⇒ Object
readonly
Returns the value of attribute test_run_started.
-
#test_step_finished ⇒ Object
readonly
Returns the value of attribute test_step_finished.
-
#test_step_started ⇒ Object
readonly
Returns the value of attribute test_step_started.
-
#undefined_parameter_type ⇒ Object
readonly
Returns the value of attribute undefined_parameter_type.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new Envelope from the given hash.
Instance Method Summary collapse
Methods inherited from Message
camelize, from_json, #to_h, #to_json
Constructor Details
#initialize(attachment: nil, gherkin_document: nil, hook: nil, meta: nil, parameter_type: nil, parse_error: nil, pickle: nil, source: nil, step_definition: nil, test_case: nil, test_case_finished: nil, test_case_started: nil, test_run_finished: nil, test_run_started: nil, test_step_finished: nil, test_step_started: nil, test_run_hook_started: nil, test_run_hook_finished: nil, undefined_parameter_type: nil) ⇒ Envelope
Returns a new instance of Envelope.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/cucumber/messages/envelope.rb', line 49 def initialize( attachment: nil, gherkin_document: nil, hook: nil, meta: nil, parameter_type: nil, parse_error: nil, pickle: nil, source: nil, step_definition: nil, test_case: nil, test_case_finished: nil, test_case_started: nil, test_run_finished: nil, test_run_started: nil, test_step_finished: nil, test_step_started: nil, test_run_hook_started: nil, test_run_hook_finished: nil, undefined_parameter_type: nil ) @attachment = @gherkin_document = gherkin_document @hook = hook @meta = @parameter_type = parameter_type @parse_error = parse_error @pickle = pickle @source = source @step_definition = step_definition @test_case = test_case @test_case_finished = test_case_finished @test_case_started = test_case_started @test_run_finished = test_run_finished @test_run_started = test_run_started @test_step_finished = test_step_finished @test_step_started = test_step_started @test_run_hook_started = test_run_hook_started @test_run_hook_finished = test_run_hook_finished @undefined_parameter_type = undefined_parameter_type super() end |
Instance Attribute Details
#attachment ⇒ Object (readonly)
Returns the value of attribute attachment.
11 12 13 |
# File 'lib/cucumber/messages/envelope.rb', line 11 def @attachment end |
#gherkin_document ⇒ Object (readonly)
Returns the value of attribute gherkin_document.
13 14 15 |
# File 'lib/cucumber/messages/envelope.rb', line 13 def gherkin_document @gherkin_document end |
#hook ⇒ Object (readonly)
Returns the value of attribute hook.
15 16 17 |
# File 'lib/cucumber/messages/envelope.rb', line 15 def hook @hook end |
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
17 18 19 |
# File 'lib/cucumber/messages/envelope.rb', line 17 def @meta end |
#parameter_type ⇒ Object (readonly)
Returns the value of attribute parameter_type.
19 20 21 |
# File 'lib/cucumber/messages/envelope.rb', line 19 def parameter_type @parameter_type end |
#parse_error ⇒ Object (readonly)
Returns the value of attribute parse_error.
21 22 23 |
# File 'lib/cucumber/messages/envelope.rb', line 21 def parse_error @parse_error end |
#pickle ⇒ Object (readonly)
Returns the value of attribute pickle.
23 24 25 |
# File 'lib/cucumber/messages/envelope.rb', line 23 def pickle @pickle end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
25 26 27 |
# File 'lib/cucumber/messages/envelope.rb', line 25 def source @source end |
#step_definition ⇒ Object (readonly)
Returns the value of attribute step_definition.
27 28 29 |
# File 'lib/cucumber/messages/envelope.rb', line 27 def step_definition @step_definition end |
#test_case ⇒ Object (readonly)
Returns the value of attribute test_case.
29 30 31 |
# File 'lib/cucumber/messages/envelope.rb', line 29 def test_case @test_case end |
#test_case_finished ⇒ Object (readonly)
Returns the value of attribute test_case_finished.
31 32 33 |
# File 'lib/cucumber/messages/envelope.rb', line 31 def test_case_finished @test_case_finished end |
#test_case_started ⇒ Object (readonly)
Returns the value of attribute test_case_started.
33 34 35 |
# File 'lib/cucumber/messages/envelope.rb', line 33 def test_case_started @test_case_started end |
#test_run_finished ⇒ Object (readonly)
Returns the value of attribute test_run_finished.
35 36 37 |
# File 'lib/cucumber/messages/envelope.rb', line 35 def test_run_finished @test_run_finished end |
#test_run_hook_finished ⇒ Object (readonly)
Returns the value of attribute test_run_hook_finished.
45 46 47 |
# File 'lib/cucumber/messages/envelope.rb', line 45 def test_run_hook_finished @test_run_hook_finished end |
#test_run_hook_started ⇒ Object (readonly)
Returns the value of attribute test_run_hook_started.
43 44 45 |
# File 'lib/cucumber/messages/envelope.rb', line 43 def test_run_hook_started @test_run_hook_started end |
#test_run_started ⇒ Object (readonly)
Returns the value of attribute test_run_started.
37 38 39 |
# File 'lib/cucumber/messages/envelope.rb', line 37 def test_run_started @test_run_started end |
#test_step_finished ⇒ Object (readonly)
Returns the value of attribute test_step_finished.
39 40 41 |
# File 'lib/cucumber/messages/envelope.rb', line 39 def test_step_finished @test_step_finished end |
#test_step_started ⇒ Object (readonly)
Returns the value of attribute test_step_started.
41 42 43 |
# File 'lib/cucumber/messages/envelope.rb', line 41 def test_step_started @test_step_started end |
#undefined_parameter_type ⇒ Object (readonly)
Returns the value of attribute undefined_parameter_type.
47 48 49 |
# File 'lib/cucumber/messages/envelope.rb', line 47 def undefined_parameter_type @undefined_parameter_type end |
Class Method Details
.from_h(hash) ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/cucumber/messages/envelope.rb', line 99 def self.from_h(hash) return nil if hash.nil? new( attachment: Attachment.from_h(hash[:attachment]), gherkin_document: GherkinDocument.from_h(hash[:gherkinDocument]), hook: Hook.from_h(hash[:hook]), meta: Meta.from_h(hash[:meta]), parameter_type: ParameterType.from_h(hash[:parameterType]), parse_error: ParseError.from_h(hash[:parseError]), pickle: Pickle.from_h(hash[:pickle]), source: Source.from_h(hash[:source]), step_definition: StepDefinition.from_h(hash[:stepDefinition]), test_case: TestCase.from_h(hash[:testCase]), test_case_finished: TestCaseFinished.from_h(hash[:testCaseFinished]), test_case_started: TestCaseStarted.from_h(hash[:testCaseStarted]), test_run_finished: TestRunFinished.from_h(hash[:testRunFinished]), test_run_started: TestRunStarted.from_h(hash[:testRunStarted]), test_step_finished: TestStepFinished.from_h(hash[:testStepFinished]), test_step_started: TestStepStarted.from_h(hash[:testStepStarted]), test_run_hook_started: TestRunHookStarted.from_h(hash[:testRunHookStarted]), test_run_hook_finished: TestRunHookFinished.from_h(hash[:testRunHookFinished]), undefined_parameter_type: UndefinedParameterType.from_h(hash[:undefinedParameterType]) ) end |