Class: Parameters::Types::Object Private
- Defined in:
- lib/parameters/types/object.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.
Class Method Summary collapse
-
.===(value) ⇒ true
private
Determines if the value is an Object.
-
.coerce(value) ⇒ value
private
Coerces the value into an Object.
-
.to_ruby ⇒ Class
private
The Ruby Class the Type represents.
Instance Method Summary collapse
-
#===(value) ⇒ true
private
Determines if the value is an Object.
Methods inherited from Type
#<, #<=, #==, #coerce, #to_ruby
Class Method Details
.===(value) ⇒ true
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.
Determines if the value is an Object.
22 23 24 |
# File 'lib/parameters/types/object.rb', line 22 def self.===(value) value.kind_of?(to_ruby) end |
.coerce(value) ⇒ value
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.
Coerces the value into an Object.
35 36 37 |
# File 'lib/parameters/types/object.rb', line 35 def self.coerce(value) value end |
.to_ruby ⇒ Class
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.
The Ruby Class the Type represents.
13 14 15 |
# File 'lib/parameters/types/object.rb', line 13 def self.to_ruby @ruby_class ||= ::Object.const_get(self.name.split('::').last) end |
Instance Method Details
#===(value) ⇒ true
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.
Determines if the value is an Object.
44 45 46 |
# File 'lib/parameters/types/object.rb', line 44 def ===(value) value.kind_of?(to_ruby) end |