Class: Eco::API::Common::Loaders::Config

Inherits:
Object
  • Object
show all
Extended by:
ClassHelpers, Language::Methods::DelegateMissing
Defined in:
lib/eco/api/common/loaders/config.rb

Direct Known Subclasses

CliConfig, Session, Workflow, Eco::API::Custom::Config

Class Method Summary collapse

Methods included from ClassHelpers

class_resolver, descendants, descendants?, inheritable_attrs, inheritable_class_vars, inherited, instance_variable_name, new_class, resolve_class, to_constant

Methods included from Language::Methods::DelegateMissing

delegate_missing_to, method_missing, respond_to_missing?

Class Method Details

.active_enviroObject



28
29
30
# File 'lib/eco/api/common/loaders/config.rb', line 28

def active_enviro
  config.active_enviro
end

.cliObject



24
25
26
# File 'lib/eco/api/common/loaders/config.rb', line 24

def cli
  ASSETS.cli
end

.configObject



20
21
22
# File 'lib/eco/api/common/loaders/config.rb', line 20

def config(...)
  ASSETS.config(...)
end

.config_block(&block) ⇒ Object

To create samples of configurations



9
10
11
12
13
14
15
16
17
18
# File 'lib/eco/api/common/loaders/config.rb', line 9

def config_block(&block)
  return @config_block unless block_given?

  unless @config_block.nil?
    msg = "Reconfiguring config_block on #{self}"
    session.log(:warn) { msg }
  end

  @config_block = block
end