Class: ConvenientService::Support::RawValue

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/support/raw_value.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ void

Parameters:

  • object (Object)

    Can be any type.



10
11
12
# File 'lib/convenient_service/support/raw_value.rb', line 10

def initialize(object)
  @object = object
end

Class Method Details

.wrap(object) ⇒ ConvenientService::Support::RawValue

Parameters:

  • object (Object)

    Can be any type.

Returns:



19
20
21
# File 'lib/convenient_service/support/raw_value.rb', line 19

def wrap(object)
  new(object)
end

Instance Method Details

#==(other) ⇒ Boolean?

Returns:

  • (Boolean, nil)


36
37
38
39
40
41
42
# File 'lib/convenient_service/support/raw_value.rb', line 36

def ==(other)
  return unless other.instance_of?(self.class)

  return false if object != other.object

  true
end

#unwrapObject

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.



29
30
31
# File 'lib/convenient_service/support/raw_value.rb', line 29

def unwrap
  object
end