Class: TwitterCldr::Transforms::RuleMatch
- Inherits:
-
Object
- Object
- TwitterCldr::Transforms::RuleMatch
- Defined in:
- lib/twitter_cldr/transforms/rule_match.rb
Instance Attribute Summary collapse
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
-
#side_match ⇒ Object
readonly
Returns the value of attribute side_match.
Instance Method Summary collapse
- #<(other_match) ⇒ Object
- #cursor_offset ⇒ Object
-
#initialize(rule, side_match) ⇒ RuleMatch
constructor
A new instance of RuleMatch.
- #replacement ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(rule, side_match) ⇒ RuleMatch
Returns a new instance of RuleMatch.
11 12 13 14 |
# File 'lib/twitter_cldr/transforms/rule_match.rb', line 11 def initialize(rule, side_match) @rule = rule @side_match = side_match end |
Instance Attribute Details
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
9 10 11 |
# File 'lib/twitter_cldr/transforms/rule_match.rb', line 9 def rule @rule end |
#side_match ⇒ Object (readonly)
Returns the value of attribute side_match.
9 10 11 |
# File 'lib/twitter_cldr/transforms/rule_match.rb', line 9 def side_match @side_match end |
Instance Method Details
#<(other_match) ⇒ Object
32 33 34 |
# File 'lib/twitter_cldr/transforms/rule_match.rb', line 32 def <(other_match) rule.index < other_match.rule.index end |
#cursor_offset ⇒ Object
28 29 30 |
# File 'lib/twitter_cldr/transforms/rule_match.rb', line 28 def cursor_offset rule.cursor_offset end |
#replacement ⇒ Object
24 25 26 |
# File 'lib/twitter_cldr/transforms/rule_match.rb', line 24 def replacement rule.replacement_for(side_match) end |
#start ⇒ Object
16 17 18 |
# File 'lib/twitter_cldr/transforms/rule_match.rb', line 16 def start side_match.start end |
#stop ⇒ Object
20 21 22 |
# File 'lib/twitter_cldr/transforms/rule_match.rb', line 20 def stop side_match.stop end |