Module: Boxy
- Defined in:
- lib/boxy.rb,
lib/boxy/dsl.rb,
lib/boxy/brew.rb,
lib/boxy/command.rb,
lib/boxy/luarock.rb,
lib/boxy/version.rb,
lib/boxy/defaulty.rb,
lib/boxy/homesick.rb,
lib/boxy/brew_cask.rb
Defined Under Namespace
Classes: BrewCaskHandler, BrewPackageHandler, Command, DefaultyHandler, Dsl, HomesickHandler, LuarockHandler
Constant Summary
collapse
- VERSION =
"0.1.0"
Class Method Summary
collapse
Class Method Details
.install(commands) ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'lib/boxy.rb', line 18
def self.install(commands)
commands.each do |command|
handler = @@handlers[command.type]
Bundler.with_clean_env do
handler.install(command.name, command.options)
end
end
end
|
.load_commands(url) ⇒ Object
6
7
8
|
# File 'lib/boxy.rb', line 6
def self.load_commands(url)
Boxy::Dsl.interpret(url).uniq
end
|
.register(type, handler) ⇒ Object
27
28
29
30
|
# File 'lib/boxy.rb', line 27
def self.register(type, handler)
@@handlers ||= {}
@@handlers[type] = handler
end
|
.validate(commands) ⇒ Object
10
11
12
13
14
15
|
# File 'lib/boxy.rb', line 10
def self.validate(commands)
commands.map do |command|
command.valid = !!@@handlers[command.type]
command
end
end
|