Skip to content

Instantly share code, notes, and snippets.

@forced-request
Created February 13, 2013 00:06
Show Gist options
  • Save forced-request/4774831 to your computer and use it in GitHub Desktop.
Save forced-request/4774831 to your computer and use it in GitHub Desktop.
class FunctionParser
def test
# How do I access @vals from sim.rb?
# puts @vals.inspect
end
end
require File.dirname(__FILE__) + '/functions'
@vals = [3,4,5]
f = FunctionParser.new
f.test
@Elixor
Copy link

Elixor commented Feb 13, 2013

i think it sould work :( :

class FunctionParser
def test(vals)
vals.each do |foo|
end
# How do I access @vals from sim.rb?
# puts @vals.inspect
end
end

require File.dirname(FILE) + '/functions'
@vals = [3,4,5]

f = FunctionParser.new
f.test(@vals)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment