Class: MendixBridge::DSL::RootBuilder
- Inherits:
-
Object
- Object
- MendixBridge::DSL::RootBuilder
- Defined in:
- lib/mendix_bridge/dsl.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build(&block) ⇒ Object
6 7 8 9 10 |
# File 'lib/mendix_bridge/dsl.rb', line 6 def self.build(&block) builder = new builder.instance_eval(&block) builder.result end |
Instance Method Details
#app(name, version: nil, &block) ⇒ Object
12 13 14 15 16 |
# File 'lib/mendix_bridge/dsl.rb', line 12 def app(name, version: nil, &block) raise ArgumentError, "only one app can be declared" if @app @app = AppBuilder.build(name, version:, &block) end |
#result ⇒ Object
18 19 20 |
# File 'lib/mendix_bridge/dsl.rb', line 18 def result @app || raise(ArgumentError, "an app declaration is required") end |