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
8 9 10 |
# File 'lib/eac_cli/runner_with_set.rb', line 8 def default @default ||= new end |
Instance Method Details
#add_from_gems_registry ⇒ Object
19 20 21 22 23 |
# File 'lib/eac_cli/runner_with_set.rb', line 19 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
13 14 15 16 17 |
# File 'lib/eac_cli/runner_with_set.rb', line 13 def add_namespace(namespace) namespace = sanitize_namespace(namespace) namespace_set << namespace unless namespace_set.include?(namespace) self end |
#item_to_module(item) ⇒ Object
25 26 27 |
# File 'lib/eac_cli/runner_with_set.rb', line 25 def item_to_module(item) item.is_a?(::Module) ? item : key_to_module(item) end |
#namespaces ⇒ Object
29 30 31 |
# File 'lib/eac_cli/runner_with_set.rb', line 29 def namespaces namespace_set.dup end |