Class: MetaCL::Program

Inherits:
Object
  • Object
show all
Defined in:
lib/metacl/program.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ Program

Returns a new instance of Program.



5
6
7
8
9
# File 'lib/metacl/program.rb', line 5

def initialize(filename)
  @platform   = :cpp
  @resources  = Logic::ResourceManager.new
  @code       = DSL::Root.new(self, filename).code
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/metacl/program.rb', line 3

def code
  @code
end

#platformObject

Returns the value of attribute platform.



3
4
5
# File 'lib/metacl/program.rb', line 3

def platform
  @platform
end

#resourcesObject

Returns the value of attribute resources.



3
4
5
# File 'lib/metacl/program.rb', line 3

def resources
  @resources
end

Class Method Details

.create(filename) ⇒ Object



15
16
17
# File 'lib/metacl/program.rb', line 15

def self.create(filename)
  Program.new(filename).code
end

Instance Method Details

#set_platform(platform) ⇒ Object



11
12
13
# File 'lib/metacl/program.rb', line 11

def set_platform(platform)
  @platform = platform
end