Class: Cry::Codegen::CrystalFunction
- Inherits:
-
Object
- Object
- Cry::Codegen::CrystalFunction
- Defined in:
- lib/cry/codegen/crystal_function.rb
Defined Under Namespace
Classes: Declaration
Instance Attribute Summary collapse
-
#declaration ⇒ Object
Returns the value of attribute declaration.
-
#definition ⇒ Object
Returns the value of attribute definition.
Instance Method Summary collapse
-
#initialize(declaration = '', initialization = '', definition = '') ⇒ CrystalFunction
constructor
A new instance of CrystalFunction.
- #source ⇒ Object
Constructor Details
#initialize(declaration = '', initialization = '', definition = '') ⇒ CrystalFunction
Returns a new instance of CrystalFunction.
26 27 28 29 30 |
# File 'lib/cry/codegen/crystal_function.rb', line 26 def initialize(declaration = '', initialization = '', definition = '') @declaration = declaration @initialization = initialization @definition = definition end |
Instance Attribute Details
#declaration ⇒ Object
Returns the value of attribute declaration.
24 25 26 |
# File 'lib/cry/codegen/crystal_function.rb', line 24 def declaration @declaration end |
#definition ⇒ Object
Returns the value of attribute definition.
24 25 26 |
# File 'lib/cry/codegen/crystal_function.rb', line 24 def definition @definition end |
Instance Method Details
#source ⇒ Object
32 33 34 |
# File 'lib/cry/codegen/crystal_function.rb', line 32 def source [@declaration, @initialization, @definition].join("\n") end |