FFI::Struct
(Not documented)
# File lib/csspool/lib_croco/cr_simple_sel.rb, line 18 def to_simple_selector klass = CSSPool::Selectors::Simple case self[:type_mask] when 1 # UNIVERSAL_SELECTOR klass = CSSPool::Selectors::Universal when 1 << 1 # TYPE_SELECTOR klass = CSSPool::Selectors::Type end simple_sel = klass.new( self[:name].null? ? nil : LibCroco.cr_string_peek_raw_str(self[:name]).read_string, self[:combinator] ) simple_sel.parse_location = { :line => self[:line], :column => self[:column], :byte_offset => self[:byte_offset] } additional_selectors = [] pointer = self[:add_sel] until pointer.null? additional_selectors << CRAdditionalSel.new(pointer) pointer = additional_selectors.last[:next] end simple_sel.additional_selectors = additional_selectors.map { |as| as.to_additional_selector } simple_sel end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.