Class: Dapp::Config::Directive::Base
- Inherits:
-
Object
- Object
- Dapp::Config::Directive::Base
show all
- Defined in:
- lib/dapp/config/directive/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize(dapp:, &blk) ⇒ Base
Returns a new instance of Base.
5
6
7
8
9
|
# File 'lib/dapp/config/directive/base.rb', line 5
def initialize(dapp:, &blk)
@dapp = dapp
initialize_variables
instance_eval(&blk) if block_given?
end
|
Instance Method Details
#clone ⇒ Object
11
12
13
|
# File 'lib/dapp/config/directive/base.rb', line 11
def clone
_clone
end
|
#encode_with(coder) ⇒ Object
15
16
17
18
19
20
|
# File 'lib/dapp/config/directive/base.rb', line 15
def encode_with(coder)
(instance_variables - [:@dapp]).each do |var|
var = var.to_s
coder[var.gsub('@', '')] = instance_variable_get(var)
end
end
|