class Parameters::Types::Object

Public Class Methods

===(value) click to toggle source

Determines if the value is an Object.

@return [true]

# File lib/parameters/types/object.rb, line 22
def self.===(value)
  value.kind_of?(to_ruby)
end
coerce(value) click to toggle source

Coerces the value into an Object.

@param [::Object] value

The value to coerce.

@return [value]

Passes through the value.
# File lib/parameters/types/object.rb, line 35
def self.coerce(value)
  value
end
to_ruby() click to toggle source

The Ruby Class the Type represents.

@return [Class]

The Ruby Class that matches the Types name.
# File lib/parameters/types/object.rb, line 13
def self.to_ruby
  @ruby_class ||= ::Object.const_get(self.name.split('::').last)
end

Public Instance Methods

===(value) click to toggle source

Determines if the value is an Object.

@return [true]

# File lib/parameters/types/object.rb, line 44
def ===(value)
  value.kind_of?(to_ruby)
end