Module: JRubyParser::Args

Class Method Summary collapse

Class Method Details

.included(cls) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/jruby-parser/util/coercer.rb', line 32

def self.included(cls)
  cls.class_eval do
    def args=(value)
      old_value = getArgs
      if value.respond_to? :to_ast_node
        value = value.to_ast_node(old_value.position) 
      end

      unless value.position
        value.position = old_value.position 
        value.each { |e| e.position = old_value.position } #if value.respond_to? :each
      end
       
      setArgs(value)
    end
  end
end