class Ironment
Constants
- VERSION
Attributes
runcom[W]
Public Class Methods
default_runcom()
click to toggle source
# File lib/ironment.rb, line 28 def default_runcom ".envrc" end
new(options = {})
click to toggle source
# File lib/ironment.rb, line 33 def initialize(options = {}) @truster = options[:truster] || Truster.new @finder = options[:finder] || Finder.new @populator = options[:populator] || Populator.new @executor = options[:executor] || Executor.new end
runcom()
click to toggle source
# File lib/ironment.rb, line 24 def runcom @runcom || default_runcom end
Public Instance Methods
exec_with_environment(command, *args)
click to toggle source
# File lib/ironment.rb, line 40 def exec_with_environment(command, *args) load_environment @executor.exec command, *args end
trust(file)
click to toggle source
# File lib/ironment.rb, line 45 def trust(file) @truster.trust Runcom.new file end
untrust(file)
click to toggle source
# File lib/ironment.rb, line 49 def untrust(file) @truster.untrust Runcom.new file end
Private Instance Methods
load_environment()
click to toggle source
# File lib/ironment.rb, line 55 def load_environment @finder.find.each do |runcom| @truster.validate runcom @populator.populate_with runcom end end