Class: ConvenientService::Examples::Standard::V1::RequestParams::Utils::Object::Blank

Inherits:
Command
  • Object
show all
Defined in:
lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb

Overview

TODO: Specs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Blank

Returns a new instance of Blank.



24
25
26
# File 'lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb', line 24

def initialize(object)
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



22
23
24
# File 'lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb', line 22

def object
  @object
end

Instance Method Details

#callObject



31
32
33
# File 'lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb', line 31

def call
  object.respond_to?(:empty?) ? !!object.empty? : !object
end