Class: Return

Inherits:
Object show all
Includes:
Code
Defined in:
lib/core/syntax/Return.rb

Instance Method Summary collapse

Constructor Details

#initializeReturn

Returns a new instance of Return.



5
6
7
# File 'lib/core/syntax/Return.rb', line 5

def initialize
  super
end

Instance Method Details

#copyObject



17
18
19
# File 'lib/core/syntax/Return.rb', line 17

def copy
  return Return.new
end

#creationObject



21
22
23
# File 'lib/core/syntax/Return.rb', line 21

def creation
  return 'Return.new'
end

#describeObject



13
14
15
# File 'lib/core/syntax/Return.rb', line 13

def describe
  return write
end

#to_declarationObject



25
26
27
# File 'lib/core/syntax/Return.rb', line 25

def to_declaration
  return VariableDeclaration.new(self.class.to_s)
end

#to_literal_stringObject



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