Class: Ironment
- Inherits:
-
Object
show all
- Defined in:
- lib/ironment.rb,
lib/ironment/cl.rb,
lib/ironment/exec.rb,
lib/ironment/config.rb,
lib/ironment/finder.rb,
lib/ironment/runcom.rb,
lib/ironment/truster.rb,
lib/ironment/version.rb,
lib/ironment/executor.rb,
lib/ironment/populator.rb,
lib/ironment/cl/prompter.rb
Defined Under Namespace
Classes: AccessDenied, CL, Config, Exec, Executor, Finder, IronmentError, IsDirectory, MalformedRuncom, NoEntity, Populator, Runcom, Truster
Constant Summary
collapse
- VERSION =
"1.0.2"
Class Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(options = {}) ⇒ Ironment
Returns a new instance of Ironment.
30
31
32
33
34
35
|
# File 'lib/ironment.rb', line 30
def initialize(options = {})
@truster = options[:truster] || Truster.new
@finder = options[:finder] || Finder.new
@populator = options[:populator] || Populator.new
@executor = options[:executor] || Executor.new
end
|
Class Attribute Details
21
22
23
|
# File 'lib/ironment.rb', line 21
def runcom
@runcom || default_runcom
end
|
Class Method Details
25
26
27
|
# File 'lib/ironment.rb', line 25
def default_runcom
".envrc"
end
|
Instance Method Details
#exec_with_environment(command, *args) ⇒ Object
37
38
39
40
|
# File 'lib/ironment.rb', line 37
def exec_with_environment(command, *args)
load_environment
@executor.exec command, *args
end
|
#trust(file) ⇒ Object
42
43
44
|
# File 'lib/ironment.rb', line 42
def trust(file)
@truster.trust Runcom.new file
end
|
#untrust(file) ⇒ Object
46
47
48
|
# File 'lib/ironment.rb', line 46
def untrust(file)
@truster.untrust Runcom.new file
end
|