Class: ConvenientService::Utils::Object::ClampClass

Inherits:
Support::Command show all
Defined in:
lib/convenient_service/utils/object/clamp_class.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Support::Command

[], call

Constructor Details

#initialize(object) ⇒ void

Parameters:



64
65
66
# File 'lib/convenient_service/utils/object/clamp_class.rb', line 64

def initialize(object)
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



58
59
60
# File 'lib/convenient_service/utils/object/clamp_class.rb', line 58

def object
  @object
end

Instance Method Details

#callClass

Returns:



71
72
73
# File 'lib/convenient_service/utils/object/clamp_class.rb', line 71

def call
  object.is_a?(::Module) ? object : object.class
end