Class: Nebula::Dsl::Main

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.evaluate(spec) ⇒ Object



4
5
6
7
8
# File 'lib/nebula/dsl.rb', line 4

def self.evaluate(spec)
  builder = new
  builder.instance_eval(spec)
  builder.to_definition
end

Instance Method Details

#cluster(name, &block) ⇒ Object



10
11
12
# File 'lib/nebula/dsl.rb', line 10

def cluster(name, &block)
  @cluster = Cluster.new(name, &block)
end

#to_definitionObject



14
15
16
# File 'lib/nebula/dsl.rb', line 14

def to_definition
  @cluster
end