Class: RedSnow::Sourcemap::Headers
- Defined in:
- lib/redsnow/sourcemap.rb
Overview
Headers source map collection node
Instance Attribute Summary collapse
-
#collection ⇒ Object
Returns the value of attribute collection.
Instance Method Summary collapse
-
#initialize(sc_sm_header_collection_handle_payload) ⇒ Headers
constructor
A new instance of Headers.
Constructor Details
#initialize(sc_sm_header_collection_handle_payload) ⇒ Headers
Returns a new instance of Headers.
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/redsnow/sourcemap.rb', line 68 def initialize(sc_sm_header_collection_handle_payload) sc_sm_header_collection_size = RedSnow::Binding.sc_sm_header_collection_size(sc_sm_header_collection_handle_payload) if sc_sm_header_collection_size > 0 headers_size = sc_sm_header_collection_size - 1 @collection = Array.new for index in 0..headers_size do sc_sm_header_handle = RedSnow::Binding.sc_sm_header_handle(sc_sm_header_collection_handle_payload, index) @collection << SourceMap.new(RedSnow::Binding.sc_sm_header(sc_sm_header_handle)) end end end |
Instance Attribute Details
#collection ⇒ Object
Returns the value of attribute collection.
65 66 67 |
# File 'lib/redsnow/sourcemap.rb', line 65 def collection @collection end |