Class: RuntimeMethodLiteral

Inherits:
Object show all
Defined in:
lib/core/literal/RuntimeMethodLiteral.rb

Overview

TODO Perhaps RuntimeMethodDeclaration might have worked better

Instance Method Summary collapse

Constructor Details

#initialize(usage, return_variable) ⇒ RuntimeMethodLiteral

Returns a new instance of RuntimeMethodLiteral.

Raises:

  • (StandardError)


5
6
7
8
9
# File 'lib/core/literal/RuntimeMethodLiteral.rb', line 5

def initialize(usage,return_variable)
  raise StandardError.new('Where is this used')
  @usage = usage
  @return_variable = return_variable
end

Instance Method Details

#copyObject

TODO This copy isn’t accurate



17
18
19
# File 'lib/core/literal/RuntimeMethodLiteral.rb', line 17

def copy
  return RuntimeMethodLiteral.new(@usage.copy, @return_variable.copy)
end

#writeObject



11
12
13
14
# File 'lib/core/literal/RuntimeMethodLiteral.rb', line 11

def write
  # TODO  This shouldn't just make up values
  return 'RuntimeMethod.new('+@usage.to_declaration.write+','+@return_variable.to_declaration.write+')'
end