Class: Ramekin::LocRange
- Inherits:
-
Object
- Object
- Ramekin::LocRange
- Defined in:
- lib/ramekin/tokenizer.rb
Instance Attribute Summary collapse
-
#fin ⇒ Object
readonly
Returns the value of attribute fin.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(start, fin) ⇒ LocRange
constructor
A new instance of LocRange.
- #pos_range ⇒ Object
Constructor Details
#initialize(start, fin) ⇒ LocRange
39 40 41 42 |
# File 'lib/ramekin/tokenizer.rb', line 39 def initialize(start, fin) @start = start @fin = fin end |
Instance Attribute Details
#fin ⇒ Object (readonly)
Returns the value of attribute fin.
38 39 40 |
# File 'lib/ramekin/tokenizer.rb', line 38 def fin @fin end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
38 39 40 |
# File 'lib/ramekin/tokenizer.rb', line 38 def start @start end |
Class Method Details
.between(a, b) ⇒ Object
34 35 36 |
# File 'lib/ramekin/tokenizer.rb', line 34 def self.between(a, b) new(a.start, b.fin) end |
Instance Method Details
#pos_range ⇒ Object
44 45 46 |
# File 'lib/ramekin/tokenizer.rb', line 44 def pos_range (@start.pos...@fin.pos) end |