Class: ConvenientService::Utils::Object::ResolveType
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::Object::ResolveType
- Defined in:
- lib/convenient_service/utils/object/resolve_type.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #call ⇒ "class", ...
-
#initialize(object) ⇒ ResolveType
constructor
A new instance of ResolveType.
Methods inherited from Support::Command
Constructor Details
#initialize(object) ⇒ ResolveType
Returns a new instance of ResolveType.
27 28 29 |
# File 'lib/convenient_service/utils/object/resolve_type.rb', line 27 def initialize(object) @object = object end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
22 23 24 |
# File 'lib/convenient_service/utils/object/resolve_type.rb', line 22 def object @object end |
Instance Method Details
#call ⇒ "class", ...
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/convenient_service/utils/object/resolve_type.rb', line 34 def call case object when ::Class "class" when ::Module "module" else "instance" end end |