Class: Oselvar::Var::Core::Hit

Inherits:
Data
  • Object
show all
Defined in:
lib/oselvar/var/core/matcher.rb

Overview

One successful expression match inside a sentence. Offsets are UTF-16.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression:, step_def:, match_start:, match_end:, args:, param_spans:, formats: []) ⇒ Hit

Returns a new instance of Hit.



12
13
14
# File 'lib/oselvar/var/core/matcher.rb', line 12

def initialize(expression:, step_def:, match_start:, match_end:, args:, param_spans:, formats: [])
  super
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



11
12
13
# File 'lib/oselvar/var/core/matcher.rb', line 11

def args
  @args
end

#expressionObject (readonly)

Returns the value of attribute expression

Returns:

  • (Object)

    the current value of expression



11
12
13
# File 'lib/oselvar/var/core/matcher.rb', line 11

def expression
  @expression
end

#formatsObject (readonly)

Returns the value of attribute formats

Returns:

  • (Object)

    the current value of formats



11
12
13
# File 'lib/oselvar/var/core/matcher.rb', line 11

def formats
  @formats
end

#match_endObject (readonly)

Returns the value of attribute match_end

Returns:

  • (Object)

    the current value of match_end



11
12
13
# File 'lib/oselvar/var/core/matcher.rb', line 11

def match_end
  @match_end
end

#match_startObject (readonly)

Returns the value of attribute match_start

Returns:

  • (Object)

    the current value of match_start



11
12
13
# File 'lib/oselvar/var/core/matcher.rb', line 11

def match_start
  @match_start
end

#param_spansObject (readonly)

Returns the value of attribute param_spans

Returns:

  • (Object)

    the current value of param_spans



11
12
13
# File 'lib/oselvar/var/core/matcher.rb', line 11

def param_spans
  @param_spans
end

#step_defObject (readonly)

Returns the value of attribute step_def

Returns:

  • (Object)

    the current value of step_def



11
12
13
# File 'lib/oselvar/var/core/matcher.rb', line 11

def step_def
  @step_def
end