Class: Pleiades::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/pleiades/core/config.rb

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *_) ⇒ Object (private)



49
50
51
52
53
# File 'lib/pleiades/core/config.rb', line 49

def method_missing(method, *_)
  @src.respond_to?(method) || super

  @src.__send__ method
end

Class Method Details

.configrationObject



7
8
9
# File 'lib/pleiades/core/config.rb', line 7

def configration
  @config = new(load).freeze
end

.method_missing(method, *_) ⇒ Object



11
12
13
14
15
# File 'lib/pleiades/core/config.rb', line 11

def method_missing(method, *_)
  return super unless @config.respond_to?(method)

  @config.__send__ method
end

.respond_to_missing?(_mes, *_) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/pleiades/core/config.rb', line 17

def respond_to_missing?(_mes, *_)
  true
end

Instance Method Details

#client_keysObject



32
33
34
35
36
37
38
39
# File 'lib/pleiades/core/config.rb', line 32

def client_keys
  @src
    .client
    .key_acquisition_process
    .each_pair.map do |_, str_proc|
      instance_eval(str_proc)
    end
end

#router_default_optionObject



28
29
30
# File 'lib/pleiades/core/config.rb', line 28

def router_default_option
  @src.router.default.symbolize_keys
end