Class: RedSnow::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/redsnow/parseresult.rb

Overview

Array of possibly non-continuous blocks of the source API Blueprint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location_hander, index) ⇒ Location

Returns a new instance of Location.

Parameters:

  • location_hander (FFI:Pointer)
  • index (Number)


73
74
75
76
# File 'lib/redsnow/parseresult.rb', line 73

def initialize(location_hander, index)
  @length = RedSnow::Binding.sc_location_length(location_hander, index)
  @index = RedSnow::Binding.sc_location_location(location_hander, index)
end

Instance Attribute Details

#indexObject

Returns the value of attribute index.



68
69
70
# File 'lib/redsnow/parseresult.rb', line 68

def index
  @index
end

#lengthObject

Returns the value of attribute length.



69
70
71
# File 'lib/redsnow/parseresult.rb', line 69

def length
  @length
end