Class: Botrytis::SemanticMatcher::StepArgument

Inherits:
Object
  • Object
show all
Defined in:
lib/botrytis/semantic_matcher.rb

Overview

Minimal step argument class for semantic matching

Instance Method Summary collapse

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

#capturesObject



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_sObject



230
231
232
# File 'lib/botrytis/semantic_matcher.rb', line 230

def to_s
  @value.to_s
end

#valueObject



234
235
236
# File 'lib/botrytis/semantic_matcher.rb', line 234

def value
  @value
end