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)


77
78
79
80
# File 'lib/redsnow/parseresult.rb', line 77

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.



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

def index
  @index
end

#lengthObject

Returns the value of attribute length.



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

def length
  @length
end