Sha256: df6880a6638279452b1f8c0a30ab3c59b5560f20ac8550d1486e9addf33970ef

Contents?: true

Size: 539 Bytes

Versions: 2

Compression:

Stored size: 539 Bytes

Contents

require 'ruby_parser'
require 'delegate'

module DRG
  class Ruby
    autoload :Const, 'drg/ruby/const'
    autoload :Condition, 'drg/ruby/condition'
    autoload :Func, 'drg/ruby/func'
    autoload :ClassFunc, 'drg/ruby/class_func'
    autoload :InstanceFunc, 'drg/ruby/instance_func'
    autoload :Assignment, 'drg/ruby/assignment'

    attr_reader :sexp, :const

    # @param [Pathname, String] file
    def initialize(file)
      @sexp = RubyParser.new.parse File.read(file)
      @const = DRG::Ruby::Const.new(sexp)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
drg-0.15.6 lib/drg/ruby.rb
drg-0.15.5 lib/drg/ruby.rb