Class: Evil::Client::Container Abstract
- Inherits:
-
Object
- Object
- Evil::Client::Container
- Defined in:
- lib/evil/client/container.rb
Overview
Container that carries schema of operation/scope along with its settings and methods to build sub-scope/operation or perform the current operation.
Defined Under Namespace
Instance Attribute Summary collapse
-
#schema ⇒ Evil::Client::Container::ScopeDefinition
readonly
The schema containing info about sub-scopes and operations of the scope.
-
#settings ⇒ Evil::Client::Settings
readonly
The settings current scope is initialized with.
Instance Method Summary collapse
-
#client ⇒ Class
The client of the [#schema].
-
#logger ⇒ Logger?
Current logger.
-
#logger=(logger) ⇒ Logger?
(Re)sets current logger.
-
#name ⇒ String
The name of the current schema.
-
#options ⇒ Hash<Symbol, Object>
Options assigned to the [#settings].
-
#to_s ⇒ String
(also: #to_str, #inspect)
The human-friendly representation of the scope instance.
Instance Attribute Details
#schema ⇒ Evil::Client::Container::ScopeDefinition (readonly)
The schema containing info about sub-scopes and operations of the scope
16 17 18 |
# File 'lib/evil/client/container.rb', line 16 def schema @schema end |
#settings ⇒ Evil::Client::Settings (readonly)
The settings current scope is initialized with
20 21 22 |
# File 'lib/evil/client/container.rb', line 20 def settings @settings end |
Instance Method Details
#client ⇒ Class
The client of the [#schema]
24 25 26 |
# File 'lib/evil/client/container.rb', line 24 def client schema.client end |
#logger ⇒ Logger?
Current logger
69 70 71 |
# File 'lib/evil/client/container.rb', line 69 def logger settings.logger end |
#logger=(logger) ⇒ Logger?
(Re)sets current logger
61 62 63 |
# File 'lib/evil/client/container.rb', line 61 def logger=(logger) settings.logger = logger end |
#name ⇒ String
The name of the current schema
30 31 32 |
# File 'lib/evil/client/container.rb', line 30 def name schema.to_s end |
#options ⇒ Hash<Symbol, Object>
Options assigned to the [#settings]
These are opts given to the [#initializer], processed (via defaults, coercion, renaming) by a constructor of settings.
40 41 42 |
# File 'lib/evil/client/container.rb', line 40 def settings. end |
#to_s ⇒ String Also known as: to_str, inspect
The human-friendly representation of the scope instance
50 51 52 |
# File 'lib/evil/client/container.rb', line 50 def to_s "#<#{name} #{options.map { |key, val| "@#{key}=#{val}" }.join(', ')}>" end |