Class: Cucumber::Core::Test::Location::Precise
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#lines ⇒ Object
Returns the value of attribute lines.
Instance Method Summary collapse
- #hash ⇒ Object
- #include?(other_lines) ⇒ Boolean
- #inspect ⇒ Object
- #line ⇒ Object
- #match?(other) ⇒ Boolean
- #on_line(new_line) ⇒ Object
- #to_s ⇒ Object
- #to_str ⇒ Object
Methods inherited from Struct
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file
55 56 57 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb', line 55 def file @file end |
#lines ⇒ Object
Returns the value of attribute lines
55 56 57 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb', line 55 def lines @lines end |
Instance Method Details
#hash ⇒ Object
74 75 76 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb', line 74 def hash [self.class, to_s].hash end |
#include?(other_lines) ⇒ Boolean
56 57 58 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb', line 56 def include?(other_lines) lines.include?(other_lines) end |
#inspect ⇒ Object
86 87 88 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb', line 86 def inspect "<#{self.class}: #{to_s}>" end |
#line ⇒ Object
60 61 62 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb', line 60 def line lines.first end |
#match?(other) ⇒ Boolean
64 65 66 67 68 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb', line 64 def match?(other) return false unless other.file == file other.include?(lines) end |
#on_line(new_line) ⇒ Object
82 83 84 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb', line 82 def on_line(new_line) Location.new(file, new_line) end |
#to_s ⇒ Object
70 71 72 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb', line 70 def to_s [file, lines.to_s].join(":") end |
#to_str ⇒ Object
78 79 80 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/location.rb', line 78 def to_str to_s end |