Class: Flaun::DSL
- Inherits:
- BasicObject
- Defined in:
- lib/flaun/dsl.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize ⇒ DSL
constructor
A new instance of DSL.
- #port(port) ⇒ Object
- #target(name, &block) ⇒ Object
Constructor Details
#initialize ⇒ DSL
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
#config ⇒ Object (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 |