Class: Equal

Inherits:
Equivalent show all
Defined in:
lib/core/assignment/Equal.rb

Overview

Reflects the use of the (=)

Instance Method Summary collapse

Constructor Details

#initializeEqual

Returns a new instance of Equal.



6
7
8
# File 'lib/core/assignment/Equal.rb', line 6

def initialize
  super
end

Instance Method Details

#copyObject



18
19
20
# File 'lib/core/assignment/Equal.rb', line 18

def copy
  return Equal.new
end

#declaration_statementObject



22
23
24
# File 'lib/core/assignment/Equal.rb', line 22

def declaration_statement
  return ClassMethodCallContainer.new(EqualClass.new,New.new)    
end

#describeObject



14
15
16
# File 'lib/core/assignment/Equal.rb', line 14

def describe
  return write
end

#equivalent?(to) ⇒ Boolean

Returns:



34
35
36
37
# File 'lib/core/assignment/Equal.rb', line 34

def equivalent?(to)
  return true if to.class == self.class
  return false    
end

#to_declarationObject



30
31
32
# File 'lib/core/assignment/Equal.rb', line 30

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

#to_literal_stringObject



26
27
28
# File 'lib/core/assignment/Equal.rb', line 26

def to_literal_string
  return '='
end

#writeObject



10
11
12
# File 'lib/core/assignment/Equal.rb', line 10

def write()
  return ' = '
end