Class: Strapper::Parser
- Inherits:
-
Object
show all
- Defined in:
- lib/strapper/parser.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
Instance Method Details
#brew(name, version = nil) ⇒ Object
10
11
12
|
# File 'lib/strapper/parser.rb', line 10
def brew(name, version=nil)
Brew.new(name, version).run
end
|
#cmd(cmd_to_run) ⇒ Object
14
15
16
|
# File 'lib/strapper/parser.rb', line 14
def cmd(cmd_to_run)
Cmd.new(cmd_to_run).run
end
|
#eval_strapfile(strapfile) ⇒ Object
5
6
7
8
|
# File 'lib/strapper/parser.rb', line 5
def eval_strapfile(strapfile)
contents = File.open(strapfile, "rb") {|f| f.read }
instance_eval(contents)
end
|