lib/wrapbox.rb in wrapbox-0.7.0 vs lib/wrapbox.rb in wrapbox-0.8.0
- old
+ new
@@ -2,23 +2,27 @@
CLASS_NAME_ENV = "WRAPBOX_CLASS_NAME".freeze
METHOD_NAME_ENV = "WRAPBOX_METHOD_NAME".freeze
METHOD_ARGS_ENV = "WRAPBOX_METHOD_ARGS".freeze
class << self
+ def load_config(filename)
+ configs.load_yaml(filename)
+ end
+
def configs
@configs ||= ConfigRepository.new
end
def configure
yield configs
end
- def run(*args, config_name: nil, **options)
+ def run(*args, runner: nil, config_name: nil, **options)
config = @configs.get(config_name)
config.run(*args, **options)
end
- def run_cmd(*args, config_name: nil, **options)
+ def run_cmd(*args, runner: nil, config_name: nil, **options)
config = @configs.get(config_name)
config.run_cmd(*args, **options)
end
end
end