Class: Odsl::Dsl

Inherits:
Object
  • Object
show all
Extended by:
Configurable
Includes:
Methods, Runners
Defined in:
lib/odsl/dsl.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Configurable

configuration, configure

Methods included from Methods

#call, #to, #use

Methods included from Runners

#run

Constructor Details

#initialize(**kwargs) ⇒ Dsl

Returns a new instance of Dsl.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/odsl/dsl.rb', line 12

def initialize(**kwargs)

  @delegated       = self
  @kwargs          = kwargs
  @context         = {}
  @last_results    = []
  @with_attributes = nil
  @finish_with     = nil
  
  kwargs.each do |key, value|
    instance_variable_set("@#{key}", value)
    @context[key] = value
  end     
end

Class Attribute Details

.inmutable_modeObject (readonly)

Returns the value of attribute inmutable_mode.



28
29
30
# File 'lib/odsl/dsl.rb', line 28

def inmutable_mode
  @inmutable_mode
end

Class Method Details

.inmutable(bool) ⇒ Object



30
31
32
# File 'lib/odsl/dsl.rb', line 30

def inmutable(bool)
  @inmutable_mode = bool
end