Class: Milkode::WideMatcherZero
- Inherits:
-
Object
- Object
- Milkode::WideMatcherZero
- Defined in:
- lib/milkode/common/wide_matcher.rb
Instance Attribute Summary collapse
-
#num_max ⇒ Object
readonly
Returns the value of attribute num_max.
Instance Method Summary collapse
- #add_line_matchs(index, matches) ⇒ Object
-
#initialize ⇒ WideMatcherZero
constructor
A new instance of WideMatcherZero.
- #linenum ⇒ Object
- #match? ⇒ Boolean
- #match_lines ⇒ Object
Constructor Details
#initialize ⇒ WideMatcherZero
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_max ⇒ Object (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 |
#linenum ⇒ Object
65 66 67 |
# File 'lib/milkode/common/wide_matcher.rb', line 65 def linenum 1 end |
#match? ⇒ Boolean
74 75 76 |
# File 'lib/milkode/common/wide_matcher.rb', line 74 def match? @matches.any? end |
#match_lines ⇒ Object
78 79 80 |
# File 'lib/milkode/common/wide_matcher.rb', line 78 def match_lines [MatchLineResult.new(@index, @matches.compact)] end |