Class: ConvenientService::Support::RawValue Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • object (Object)

    Can be any type.

Since:

  • 1.0.0



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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • object (Object)

    Can be any type.

Returns:

Since:

  • 1.0.0



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

def wrap(object)
  new(object)
end

Instance Method Details

#==(other) ⇒ Boolean?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean, nil)

Since:

  • 1.0.0



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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



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

def unwrap
  object
end