module VirtualModule::SexpParser
Public Instance Methods
extract_args(s)
click to toggle source
# File lib/virtual_module.rb, line 44 def extract_args(s) if s.instance_of?(Array) && s[0].instance_of?(Symbol) then if [:vcall, :var_field].include?(s[0]) "#{s[1][1]}," else s.map{|e| extract_args(e)}.join end elsif s.instance_of?(Array) && s[0].instance_of?(Array) then s.map{|e| extract_args(e)}.join end end
extract_defs(s)
click to toggle source
# File lib/virtual_module.rb, line 32 def extract_defs(s) if s.instance_of?(Array) && s[0].instance_of?(Symbol) then if [:def].include?(s[0]) "#{s[1][1]}," else s.map{|e| extract_defs(e)}.join end elsif s.instance_of?(Array) && s[0].instance_of?(Array) then s.map{|e| extract_defs(e)}.join end end