Class: HolePunch::ServiceDSL

Inherits:
BaseDSL
  • Object
show all
Defined in:
lib/holepunch/dsl.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseDSL

#env, #eval_dsl

Constructor Details

#initialize(env, id) ⇒ ServiceDSL

Returns a new instance of ServiceDSL.



50
51
52
# File 'lib/holepunch/dsl.rb', line 50

def initialize(env, id)
  super(env, Service.new(id))
end

Class Method Details

.evaluate(env, *args, &block) ⇒ Object



46
47
48
# File 'lib/holepunch/dsl.rb', line 46

def self.evaluate(env, *args, &block)
  new(env, *args).eval_dsl(&block)
end

Instance Method Details

#groups(*ids) ⇒ Object



54
55
56
# File 'lib/holepunch/dsl.rb', line 54

def groups(*ids)
  @model.groups.concat(ids.flatten)
end