Class: RemLint::Trigger::Clause

Inherits:
Struct
  • Object
show all
Defined in:
lib/remlint/trigger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#end_offsetObject

Returns the value of attribute end_offset

Returns:

  • (Object)

    the current value of end_offset



23
24
25
# File 'lib/remlint/trigger.rb', line 23

def end_offset
  @end_offset
end

#keywordObject

Returns the value of attribute keyword

Returns:

  • (Object)

    the current value of keyword



23
24
25
# File 'lib/remlint/trigger.rb', line 23

def keyword
  @keyword
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



23
24
25
# File 'lib/remlint/trigger.rb', line 23

def offset
  @offset
end

#token_indexObject

Returns the value of attribute token_index

Returns:

  • (Object)

    the current value of token_index



23
24
25
# File 'lib/remlint/trigger.rb', line 23

def token_index
  @token_index
end

#token_widthObject

Returns the value of attribute token_width

Returns:

  • (Object)

    the current value of token_width



23
24
25
# File 'lib/remlint/trigger.rb', line 23

def token_width
  @token_width
end

Instance Method Details

#argument_indexObject

Where the clause's argument starts, in tokens. A hyphenated keyword such as MAX-OVERDUE occupies three of them, so this is not always token_index + 1.



38
39
40
# File 'lib/remlint/trigger.rb', line 38

def argument_index
  token_index + token_width
end

#nameObject



31
32
33
# File 'lib/remlint/trigger.rb', line 31

def name
  keyword.name
end