Class: ConvenientService::Utils::Object::ClampClass
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::Object::ClampClass
- Defined in:
- lib/convenient_service/utils/object/clamp_class.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #call ⇒ Class
- #initialize(object) ⇒ void constructor
Methods inherited from Support::Command
Constructor Details
#initialize(object) ⇒ void
64 65 66 |
# File 'lib/convenient_service/utils/object/clamp_class.rb', line 64 def initialize(object) @object = object end |
Instance Attribute Details
#object ⇒ Object (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
#call ⇒ Class
71 72 73 |
# File 'lib/convenient_service/utils/object/clamp_class.rb', line 71 def call object.is_a?(::Module) ? object : object.class end |