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

Inherits:
Command
  • Object
show all
Defined in:
lib/convenient_service/examples/standard/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.



18
19
20
# File 'lib/convenient_service/examples/standard/request_params/utils/object/blank.rb', line 18

def initialize(object)
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



16
17
18
# File 'lib/convenient_service/examples/standard/request_params/utils/object/blank.rb', line 16

def object
  @object
end

Instance Method Details

#callObject



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

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