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.



15
16
17
# File 'lib/convenient_service/support/raw_value.rb', line 15

def initialize(object)
  @object = object
end

Class Method Details

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

Parameters:

  • object (Object)

    Can be any type.

Returns:



24
25
26
# File 'lib/convenient_service/support/raw_value.rb', line 24

def wrap(object)
  new(object)
end

Instance Method Details

#==(other) ⇒ Boolean?

Returns:

  • (Boolean, nil)


41
42
43
44
45
46
47
# File 'lib/convenient_service/support/raw_value.rb', line 41

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.



34
35
36
# File 'lib/convenient_service/support/raw_value.rb', line 34

def unwrap
  object
end