Class: EacCli::RunnerWithSet
Class Method Summary collapse
Instance Method Summary collapse
- #add_from_gems_registry ⇒ Object
- #add_namespace(namespace) ⇒ Object
- #item_to_module(item) ⇒ Object
- #namespaces ⇒ Object
Class Method Details
.default ⇒ Object
6 7 8 |
# File 'lib/eac_cli/runner_with_set.rb', line 6 def default @default ||= new end |
Instance Method Details
#add_from_gems_registry ⇒ Object
17 18 19 20 21 |
# File 'lib/eac_cli/runner_with_set.rb', line 17 def add_from_gems_registry ::EacRubyUtils::GemsRegistry.new('RunnerWith').registered.each do |registered_gem| add_namespace(registered_gem.registered_module) end end |
#add_namespace(namespace) ⇒ Object
11 12 13 14 15 |
# File 'lib/eac_cli/runner_with_set.rb', line 11 def add_namespace(namespace) namespace = sanitize_namespace(namespace) namespace_set << namespace unless namespace_set.include?(namespace) self end |
#item_to_module(item) ⇒ Object
23 24 25 |
# File 'lib/eac_cli/runner_with_set.rb', line 23 def item_to_module(item) item.is_a?(::Module) ? item : key_to_module(item) end |
#namespaces ⇒ Object
27 28 29 |
# File 'lib/eac_cli/runner_with_set.rb', line 27 def namespaces namespace_set.dup end |