Class: XfOOrth::ClassSpec
- Inherits:
-
AbstractWordSpec
- Object
- AbstractWordSpec
- XfOOrth::ClassSpec
- Defined in:
- lib/fOOrth/compiler/word_specs.rb
Overview
A class used to specify the compile of fOOrth classes.
Instance Attribute Summary collapse
-
#new_class ⇒ Object
readonly
Give read access to the class for testing.
Attributes inherited from AbstractWordSpec
Instance Method Summary collapse
-
#build_builds_string(new_class, _symbol) ⇒ Object
Generate the Ruby code for this fOOrth class.
Methods inherited from AbstractWordSpec
#get_info, #get_stub_action, #has_tag?, #initialize
Constructor Details
This class inherits a constructor from XfOOrth::AbstractWordSpec
Instance Attribute Details
#new_class ⇒ Object (readonly)
Give read access to the class for testing.
121 122 123 |
# File 'lib/fOOrth/compiler/word_specs.rb', line 121 def new_class @new_class end |
Instance Method Details
#build_builds_string(new_class, _symbol) ⇒ Object
Generate the Ruby code for this fOOrth class.
Parameters:
-
new_class - The class object being specified.
-
_symbol - The symbol that the name maps to. Unused
115 116 117 118 |
# File 'lib/fOOrth/compiler/word_specs.rb', line 115 def build_builds_string(new_class, _symbol) @new_class = new_class @builds = "vm.push(#{new_class.name}); " end |