class Action::BeanAction
Public Class Methods
new(bean_file)
click to toggle source
# File lib/bean/action.rb, line 5 def initialize(bean_file) @bean_file = bean_file define_bean_action end
Private Instance Methods
define_bean_action()
click to toggle source
# File lib/bean/action.rb, line 12 def define_bean_action configs = {} Kernel.send :define_method, :bean do |name, &block| config = Workspace::Config.new(name) block.call(config) configs[name.to_sym] = config end load @bean_file BeanAction.send :define_method, :run do |name| return puts "The action `#{name}` does not exist" unless config = configs[name.to_sym] XcodeBuilder::Archiver.archive(config) end end