Sha256: d242c52a56d0dd4075d33bb0c2fc60b62198c33087f031317d45e4b4c0cfcce3

Contents?: true

Size: 408 Bytes

Versions: 8

Compression:

Stored size: 408 Bytes

Contents

module Mutant
  # An AST Parser
  class Parser
    include Adamantium::Mutable, 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] ||= ::Parser::CurrentRuby.parse(path.read)
    end

  end # Parser
end # Mutant

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mutant-0.8.16 lib/mutant/parser.rb
mutant-0.8.15 lib/mutant/parser.rb
mutant-0.8.14 lib/mutant/parser.rb
mutant-0.8.13 lib/mutant/parser.rb
mutant-0.8.12 lib/mutant/parser.rb
mutant-0.8.11 lib/mutant/parser.rb
mutant-0.8.10 lib/mutant/parser.rb
mutant-0.8.9 lib/mutant/parser.rb