Class: Code::Object::Class

Inherits:
Code::Object show all
Defined in:
lib/code/object/class.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Code::Object

#<=>, #==, call, #code_and_operator, code_and_operator, #code_different, code_different, code_equal_equal, #code_equal_equal, #code_equal_equal_equal, code_equal_equal_equal, code_exclamation_point, #code_exclamation_point, code_exclusive_range, #code_exclusive_range, code_inclusive_range, #code_inclusive_range, code_or_operator, #code_or_operator, code_self, #code_self, code_to_string, #code_to_string, falsy?, #falsy?, hash, #hash, maybe, multi_fetch, #multi_fetch, repeat, sig, #sig, to_s, truthy?, #truthy?, |

Constructor Details

#initialize(raw) ⇒ Class

Returns a new instance of Class.



8
9
10
# File 'lib/code/object/class.rb', line 8

def initialize(raw)
  @raw = raw
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



6
7
8
# File 'lib/code/object/class.rb', line 6

def raw
  @raw
end

Class Method Details

.nameObject



24
25
26
# File 'lib/code/object/class.rb', line 24

def self.name
  "Class"
end

Instance Method Details

#callObject



12
13
14
# File 'lib/code/object/class.rb', line 12

def call(...)
  raw.call(...)
end

#inspectObject



20
21
22
# File 'lib/code/object/class.rb', line 20

def inspect
  to_s
end

#to_sObject



16
17
18
# File 'lib/code/object/class.rb', line 16

def to_s
  raw.name
end