Class: ConvenientService::Utils::Object::InstanceVariableDelete
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::Object::InstanceVariableDelete
- Defined in:
- lib/convenient_service/utils/object/instance_variable_delete.rb
Instance Attribute Summary collapse
-
#ivar_name ⇒ Object
readonly
Returns the value of attribute ivar_name.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
-
#call ⇒ Object
Value of ivar.
- #initialize(object, ivar_name) ⇒ void constructor
Methods inherited from Support::Command
Constructor Details
#initialize(object, ivar_name) ⇒ void
27 28 29 30 |
# File 'lib/convenient_service/utils/object/instance_variable_delete.rb', line 27 def initialize(object, ivar_name) @object = object @ivar_name = ivar_name end |
Instance Attribute Details
#ivar_name ⇒ Object (readonly)
Returns the value of attribute ivar_name.
20 21 22 |
# File 'lib/convenient_service/utils/object/instance_variable_delete.rb', line 20 def ivar_name @ivar_name end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
14 15 16 |
# File 'lib/convenient_service/utils/object/instance_variable_delete.rb', line 14 def object @object end |
Instance Method Details
#call ⇒ Object
Returns Value of ivar. Can be any type.
35 36 37 |
# File 'lib/convenient_service/utils/object/instance_variable_delete.rb', line 35 def call object.remove_instance_variable(ivar_name) if object.instance_variable_defined?(ivar_name) end |