Class: Fum::Lang::FumFile

Inherits:
Object
  • Object
show all
Defined in:
lib/fum/lang/fum_file.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/fum/lang/fum_file.rb', line 8

def name
  @name
end

Class Method Details

.load(filename) ⇒ Object



10
11
12
13
14
# File 'lib/fum/lang/fum_file.rb', line 10

def self.load(filename)
  file = self.new
  file.instance_eval(File.read(filename), filename)
  file
end

Instance Method Details

#application_name(name) ⇒ Object



16
17
18
# File 'lib/fum/lang/fum_file.rb', line 16

def application_name(name)
  @name = name
end

#stage(*args, &block) ⇒ Object



24
25
26
27
# File 'lib/fum/lang/fum_file.rb', line 24

def stage(*args, &block)
  stage = Fum::Lang::Stage.new(*args, &block)
  stages[stage.id] = stage
end

#stagesObject



20
21
22
# File 'lib/fum/lang/fum_file.rb', line 20

def stages
  @stages ||= {}
end