Class: Milkode::WideMatcherZero

Inherits:
Object
  • Object
show all
Defined in:
lib/milkode/common/wide_matcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWideMatcherZero

Returns a new instance of WideMatcherZero.



61
62
63
# File 'lib/milkode/common/wide_matcher.rb', line 61

def initialize
  @num_max   = 0
end

Instance Attribute Details

#num_maxObject (readonly)

Returns the value of attribute num_max.



59
60
61
# File 'lib/milkode/common/wide_matcher.rb', line 59

def num_max
  @num_max
end

Instance Method Details

#add_line_matchs(index, matches) ⇒ Object



69
70
71
72
# File 'lib/milkode/common/wide_matcher.rb', line 69

def add_line_matchs(index, matches)
  @index   = index
  @matches = matches
end

#linenumObject



65
66
67
# File 'lib/milkode/common/wide_matcher.rb', line 65

def linenum
  1
end

#match?Boolean

Returns:

  • (Boolean)


74
75
76
# File 'lib/milkode/common/wide_matcher.rb', line 74

def match?
  @matches.any?
end

#match_linesObject



78
79
80
# File 'lib/milkode/common/wide_matcher.rb', line 78

def match_lines
  [MatchLineResult.new(@index, @matches.compact)]
end