Class: RedSnow::Sourcemap::SourceMap
- Inherits:
-
Array
- Object
- Array
- RedSnow::Sourcemap::SourceMap
- Defined in:
- lib/redsnow/sourcemap.rb
Instance Method Summary collapse
-
#initialize(sc_source_map_handle) ⇒ SourceMap
constructor
A new instance of SourceMap.
Constructor Details
#initialize(sc_source_map_handle) ⇒ SourceMap
Returns a new instance of SourceMap.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/redsnow/sourcemap.rb', line 14 def initialize(sc_source_map_handle) source_map_size = RedSnow::Binding.sc_source_map_size(sc_source_map_handle) - 1 for index in 0..source_map_size do location = RedSnow::Binding.sc_source_map_location(sc_source_map_handle, index) length = RedSnow::Binding.sc_source_map_length(sc_source_map_handle, index) self << [location, length] end end |