Sha256: bf5d317617a4cab8cf51b451d93d16e363e1112cdad220cae08e460520c4a8a9

Contents?: true

Size: 240 Bytes

Versions: 5

Compression:

Stored size: 240 Bytes

Contents

module JSONSelect::Ast::SelectorGroup
  
  def to_ast
    if b.elements.empty?
      return a.to_ast
    end
    
    ast = [',', a.to_ast]
    
    b.elements.each do |group|
      ast.push group.c.to_ast
    end
    
    ast
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
json_select-0.1.4 lib/json_select/ast/selector_group.rb
json_select-0.1.3 lib/json_select/ast/selector_group.rb
json_select-0.1.2 lib/json_select/ast/selector_group.rb
json_select-0.1.1 lib/json_select/ast/selector_group.rb
json_select-0.1.0 lib/json_select/ast/selector_group.rb