Class: Interdependence::Types::Field
- Inherits:
-
Object
- Object
- Interdependence::Types::Field
- Defined in:
- lib/interdependence/types.rb
Overview
Wrapper for validator fields
Useful for handling and resolving cases where fields are not yet specified
Instance Attribute Summary collapse
-
#name ⇒ Symbol
readonly
private
name of field.
Instance Method Summary collapse
-
#==(other) ⇒ TrueClass, FalseClass
(also: #eql?)
private
Compare with other field.
-
#initialize(name) ⇒ Void
constructor
private
Create a new field.
-
#unset? ⇒ FalseClass
private
Always return false.
Constructor Details
#initialize(name) ⇒ 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.
Create a new field
69 70 71 |
# File 'lib/interdependence/types.rb', line 69 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Symbol (readonly)
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.
name of field
59 60 61 |
# File 'lib/interdependence/types.rb', line 59 def name @name end |
Instance Method Details
#==(other) ⇒ TrueClass, FalseClass Also known as: eql?
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.
Compare with other field
91 92 93 |
# File 'lib/interdependence/types.rb', line 91 def ==(other) name.equal?(other.name) end |
#unset? ⇒ FalseClass
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.
Always return false. For comparing with UnsetField
79 80 81 |
# File 'lib/interdependence/types.rb', line 79 def unset? false end |