Class: Cucumber::Core::Ast::Comment
- Inherits:
-
Object
- Object
- Cucumber::Core::Ast::Comment
- Includes:
- HasLocation
- Defined in:
- lib/cucumber/core/ast/comment.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
-
#initialize(location, value) ⇒ Comment
constructor
A new instance of Comment.
- #inspect ⇒ Object
- #to_s ⇒ Object
Methods included from HasLocation
#all_locations, #attributes, #comments, #file, #file_colon_line, #line, #multiline_arg, #tags
Constructor Details
#initialize(location, value) ⇒ Comment
Returns a new instance of Comment.
12 13 14 15 |
# File 'lib/cucumber/core/ast/comment.rb', line 12 def initialize(location, value) @location = location @value = value end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
9 10 11 |
# File 'lib/cucumber/core/ast/comment.rb', line 9 def location @location end |
Instance Method Details
#inspect ⇒ Object
21 22 23 |
# File 'lib/cucumber/core/ast/comment.rb', line 21 def inspect %{#<#{self.class} #{value} (#{location})} end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/cucumber/core/ast/comment.rb', line 17 def to_s value end |