Class: DRG::Ruby

Inherits:
Object
  • Object
show all
Defined in:
lib/drg/ruby.rb

Defined Under Namespace

Classes: ClassFunc, Condition, Const, Func, InstanceFunc

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ Ruby

Returns a new instance of Ruby.

Parameters:

  • file (Pathname)


15
16
17
18
# File 'lib/drg/ruby.rb', line 15

def initialize(file)
  @sexp = RubyParser.new.parse File.read(file)
  @const = DRG::Ruby::Const.new(sexp)
end

Instance Attribute Details

#constObject (readonly)

Returns the value of attribute const.



12
13
14
# File 'lib/drg/ruby.rb', line 12

def const
  @const
end

#sexpObject (readonly)

Returns the value of attribute sexp.



12
13
14
# File 'lib/drg/ruby.rb', line 12

def sexp
  @sexp
end