Class: Flaun::DSL

Inherits:
BasicObject
Defined in:
lib/flaun/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDSL

Returns a new instance of DSL.



7
8
9
# File 'lib/flaun/dsl.rb', line 7

def initialize
  @config = ::Flaun::Config.new
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



5
6
7
# File 'lib/flaun/dsl.rb', line 5

def config
  @config
end

Instance Method Details

#port(port) ⇒ Object



11
12
13
# File 'lib/flaun/dsl.rb', line 11

def port(port)
  @config.port = port
end

#target(name, &block) ⇒ Object



15
16
17
18
19
# File 'lib/flaun/dsl.rb', line 15

def target(name, &block)
  target = DSLTarget.new(@config)
  target.instance_exec &block
  @config.targets[name] = target.config
end