Class: Code::Object::Class

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

Instance Attribute Summary

Attributes inherited from Code::Object

#raw

Instance Method Summary collapse

Methods inherited from Code::Object

#<=>, #==, as_json, #as_json, call, #code_and_operator, code_and_operator, #code_as_json, code_as_json, 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_new, code_or_operator, #code_or_operator, code_self, #code_self, #code_to_json, code_to_json, falsy?, #falsy?, #hash, inspect, maybe, multi_fetch, #multi_fetch, #nothing?, nothing?, repeat, sig, #sig, #succ, to_json, #to_json, to_s, truthy?, #truthy?, |

Constructor Details

#initialize(*args, **_kargs) ⇒ Class

Returns a new instance of Class.



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

def initialize(*args, **_kargs, &)
  raw = args.first || Nothing.new
  raw = raw.raw if raw.is_a?(Class)
  raw = raw.class if raw.is_an?(Object)
  @raw = raw
end

Instance Method Details

#callObject



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

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