Class: Cucumber::Messages::PickleTag
- Defined in:
- lib/cucumber/messages/pickle_tag.rb
Overview
Instance Attribute Summary collapse
-
#ast_node_id ⇒ Object
readonly
Points to the AST node this was created from.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new PickleTag from the given hash.
Instance Method Summary collapse
-
#initialize(name: '', ast_node_id: '') ⇒ PickleTag
constructor
A new instance of PickleTag.
Methods inherited from Message
camelize, from_json, #to_h, #to_json
Constructor Details
#initialize(name: '', ast_node_id: '') ⇒ PickleTag
Returns a new instance of PickleTag.
21 22 23 24 25 26 27 28 |
# File 'lib/cucumber/messages/pickle_tag.rb', line 21 def initialize( name: '', ast_node_id: '' ) @name = name @ast_node_id = ast_node_id super() end |
Instance Attribute Details
#ast_node_id ⇒ Object (readonly)
Points to the AST node this was created from
19 20 21 |
# File 'lib/cucumber/messages/pickle_tag.rb', line 19 def ast_node_id @ast_node_id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/cucumber/messages/pickle_tag.rb', line 14 def name @name end |
Class Method Details
.from_h(hash) ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/cucumber/messages/pickle_tag.rb', line 37 def self.from_h(hash) return nil if hash.nil? new( name: hash[:name], ast_node_id: hash[:astNodeId] ) end |