Class: Ramekin::LocRange

Inherits:
Object
  • Object
show all
Defined in:
lib/ramekin/tokenizer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#finObject (readonly)

Returns the value of attribute fin.



38
39
40
# File 'lib/ramekin/tokenizer.rb', line 38

def fin
  @fin
end

#startObject (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_rangeObject



44
45
46
# File 'lib/ramekin/tokenizer.rb', line 44

def pos_range
  (@start.pos...@fin.pos)
end