Sha256: 73cc566a92c7ca4c86ff9ee232737bf2f9438bde3a4af2f5b45e1fbb526bb59b

Contents?: true

Size: 417 Bytes

Versions: 18

Compression:

Stored size: 417 Bytes

Contents

# frozen_string_literal: true

module Mutant
  # An AST Parser
  class Parser
    include Adamantium, Equalizer.new

    # Initialize object
    #
    # @return [undefined]
    def initialize
      @cache = {}
    end

    # Parse path into AST
    #
    # @param [Pathname] path
    #
    # @return [AST::Node]
    def call(path)
      @cache[path] ||= Unparser.parse(path.read)
    end

  end # Parser
end # Mutant

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mutant-0.11.7 lib/mutant/parser.rb
mutant-0.11.6 lib/mutant/parser.rb
mutant-0.11.5 lib/mutant/parser.rb
mutant-0.11.4 lib/mutant/parser.rb
mutant-0.11.3 lib/mutant/parser.rb
mutant-0.11.2 lib/mutant/parser.rb
mutant-0.11.1 lib/mutant/parser.rb
mutant-0.11.0 lib/mutant/parser.rb
mutant-0.10.35 lib/mutant/parser.rb
mutant-0.10.34 lib/mutant/parser.rb
mutant-0.10.33 lib/mutant/parser.rb
mutant-0.10.32 lib/mutant/parser.rb
mutant-0.10.31 lib/mutant/parser.rb
mutant-0.10.30 lib/mutant/parser.rb
mutant-0.10.29 lib/mutant/parser.rb
mutant-0.10.28 lib/mutant/parser.rb
mutant-0.10.27 lib/mutant/parser.rb
mutant-0.10.26 lib/mutant/parser.rb