Class: Equal
- Inherits:
-
Equivalent
- Object
- Assignment
- Equivalent
- Equal
- Defined in:
- lib/core/assignment/Equal.rb
Overview
Reflects the use of the (=)
Instance Method Summary collapse
- #copy ⇒ Object
- #declaration_statement ⇒ Object
- #describe ⇒ Object
- #equivalent?(to) ⇒ Boolean
-
#initialize ⇒ Equal
constructor
A new instance of Equal.
- #to_declaration ⇒ Object
- #to_literal_string ⇒ Object
- #write ⇒ Object
Constructor Details
#initialize ⇒ Equal
Returns a new instance of Equal.
6 7 8 |
# File 'lib/core/assignment/Equal.rb', line 6 def initialize super end |
Instance Method Details
#copy ⇒ Object
18 19 20 |
# File 'lib/core/assignment/Equal.rb', line 18 def copy return Equal.new end |
#declaration_statement ⇒ Object
22 23 24 |
# File 'lib/core/assignment/Equal.rb', line 22 def declaration_statement return ClassMethodCallContainer.new(EqualClass.new,New.new) end |
#describe ⇒ Object
14 15 16 |
# File 'lib/core/assignment/Equal.rb', line 14 def describe return write end |
#equivalent?(to) ⇒ Boolean
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_declaration ⇒ Object
30 31 32 |
# File 'lib/core/assignment/Equal.rb', line 30 def to_declaration return VariableDeclaration.new(self.class.to_s) end |
#to_literal_string ⇒ Object
26 27 28 |
# File 'lib/core/assignment/Equal.rb', line 26 def to_literal_string return '=' end |
#write ⇒ Object
10 11 12 |
# File 'lib/core/assignment/Equal.rb', line 10 def write() return ' = ' end |