Class: Botrytis::SemanticMatcher::StepArgument
- Inherits:
-
Object
- Object
- Botrytis::SemanticMatcher::StepArgument
- Defined in:
- lib/botrytis/semantic_matcher.rb
Overview
Minimal step argument class for semantic matching
Instance Method Summary collapse
- #captures ⇒ Object
- #group(index = 0) ⇒ Object
-
#initialize(value) ⇒ StepArgument
constructor
A new instance of StepArgument.
- #to_s ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(value) ⇒ StepArgument
Returns a new instance of StepArgument.
222 223 224 |
# File 'lib/botrytis/semantic_matcher.rb', line 222 def initialize(value) @value = value end |
Instance Method Details
#captures ⇒ Object
238 239 240 |
# File 'lib/botrytis/semantic_matcher.rb', line 238 def captures [@value] end |
#group(index = 0) ⇒ Object
226 227 228 |
# File 'lib/botrytis/semantic_matcher.rb', line 226 def group(index = 0) index == 0 ? @value : nil end |
#to_s ⇒ Object
230 231 232 |
# File 'lib/botrytis/semantic_matcher.rb', line 230 def to_s @value.to_s end |
#value ⇒ Object
234 235 236 |
# File 'lib/botrytis/semantic_matcher.rb', line 234 def value @value end |