Class: EacCli::RunnerWithSet

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_cli/runner_with_set.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.defaultObject



6
7
8
# File 'lib/eac_cli/runner_with_set.rb', line 6

def default
  @default ||= new
end

Instance Method Details

#add_namespace(namespace) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/eac_cli/runner_with_set.rb', line 11

def add_namespace(namespace)
  namespace = sanitize_namespace(namespace)
  raise "\"#{namespace}\" already was included" if namespace_set.include?(namespace)

  namespace_set << namespace
  self
end

#item_to_module(item) ⇒ Object



19
20
21
# File 'lib/eac_cli/runner_with_set.rb', line 19

def item_to_module(item)
  item.is_a?(::Module) ? item : key_to_module(item)
end

#namespacesObject



23
24
25
# File 'lib/eac_cli/runner_with_set.rb', line 23

def namespaces
  namespace_set.dup
end