Class: Regexer::Models::CharacterRangePattern
- Inherits:
-
Object
- Object
- Regexer::Models::CharacterRangePattern
- Defined in:
- lib/regexer/models/character_range_pattern.rb
Overview
The main model for character range patterns
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(from, to) ⇒ CharacterRangePattern
constructor
A new instance of CharacterRangePattern.
Constructor Details
#initialize(from, to) ⇒ CharacterRangePattern
Returns a new instance of CharacterRangePattern.
9 10 11 12 |
# File 'lib/regexer/models/character_range_pattern.rb', line 9 def initialize(from, to) @from = Regexp.escape(from) @to = Regexp.escape(to) end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
7 8 9 |
# File 'lib/regexer/models/character_range_pattern.rb', line 7 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
7 8 9 |
# File 'lib/regexer/models/character_range_pattern.rb', line 7 def to @to end |