Class: Return
Instance Method Summary collapse
- #copy ⇒ Object
- #creation ⇒ Object
- #describe ⇒ Object
-
#initialize ⇒ Return
constructor
A new instance of Return.
- #to_declaration ⇒ Object
- #to_literal_string ⇒ Object
- #write(method_context = nil) ⇒ Object
Constructor Details
#initialize ⇒ Return
Returns a new instance of Return.
5 6 7 |
# File 'lib/core/syntax/Return.rb', line 5 def initialize super end |
Instance Method Details
#creation ⇒ Object
21 22 23 |
# File 'lib/core/syntax/Return.rb', line 21 def creation return 'Return.new' end |
#describe ⇒ Object
13 14 15 |
# File 'lib/core/syntax/Return.rb', line 13 def describe return write end |
#to_declaration ⇒ Object
25 26 27 |
# File 'lib/core/syntax/Return.rb', line 25 def to_declaration return VariableDeclaration.new(self.class.to_s) end |
#to_literal_string ⇒ Object
29 30 31 |
# File 'lib/core/syntax/Return.rb', line 29 def to_literal_string return write end |
#write(method_context = nil) ⇒ Object
9 10 11 |
# File 'lib/core/syntax/Return.rb', line 9 def write(method_context=nil) return 'return ' end |