Class: Cucumber::Messages::PickleTableCell

Inherits:
Message
  • Object
show all
Defined in:
lib/cucumber/messages/pickle_table_cell.rb

Overview

Represents the PickleTableCell message in Cucumber’s message protocol.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Message

camelize, from_json, #to_h, #to_json

Constructor Details

#initialize(value: '') ⇒ PickleTableCell

Returns a new instance of PickleTableCell.



13
14
15
16
17
18
# File 'lib/cucumber/messages/pickle_table_cell.rb', line 13

def initialize(
  value: ''
)
  @value = value
  super()
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



11
12
13
# File 'lib/cucumber/messages/pickle_table_cell.rb', line 11

def value
  @value
end

Class Method Details

.from_h(hash) ⇒ Object

Returns a new PickleTableCell from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.

Cucumber::Messages::PickleTableCell.from_h(some_hash) # => #<Cucumber::Messages::PickleTableCell:0x... ...>


27
28
29
30
31
32
33
# File 'lib/cucumber/messages/pickle_table_cell.rb', line 27

def self.from_h(hash)
  return nil if hash.nil?

  new(
    value: hash[:value]
  )
end