Class: Regexer::Models::CharacterRangePattern

Inherits:
Object
  • Object
show all
Defined in:
lib/regexer/models/character_range_pattern.rb

Overview

The main model for character range patterns

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fromObject (readonly)

Returns the value of attribute from.



7
8
9
# File 'lib/regexer/models/character_range_pattern.rb', line 7

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to.



7
8
9
# File 'lib/regexer/models/character_range_pattern.rb', line 7

def to
  @to
end