Class: Dapp::Deployment::Config::Directive::Group

Inherits:
Base show all
Includes:
App::InstanceMethods, Mod::Group
Defined in:
lib/dapp/deployment/config/directive/group.rb

Direct Known Subclasses

Deployment

Instance Attribute Summary

Attributes included from App::InstanceMethods

#_dimg, #_expose, #_migrate, #_namespace

Instance Method Summary collapse

Methods included from App::InstanceMethods

#dimg, #expose, included, #migrate, #namespace

Methods inherited from Base

#hostname_pattern

Methods inherited from Config::Directive::Base

#clone, #initialize

Constructor Details

This class inherits a constructor from Dapp::Config::Directive::Base

Instance Method Details

#app(name = nil, &blk) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/dapp/deployment/config/directive/group.rb', line 16

def app(name = nil, &blk)
  App.new(name, dapp: dapp).tap do |app|
    pass_to(app)
    app.instance_eval(&blk) if block_given?
    @_app << app
  end
end

#group(&blk) ⇒ Object



9
10
11
12
13
14
# File 'lib/dapp/deployment/config/directive/group.rb', line 9

def group(&blk)
  Group.new(dapp: dapp).tap do |group|
    group.instance_eval(&blk) if block_given?
    @_group << group
  end
end