Class: ConvenientService::Support::Value Private
- Inherits:
-
Object
- Object
- ConvenientService::Support::Value
- Defined in:
- lib/convenient_service/support/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.
Instance Attribute Summary collapse
- #label ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Boolean? private
- #===(other) ⇒ Boolean? private
- #eql?(other) ⇒ Boolean? private
- #hash ⇒ Integer private
- #initialize(label = default_label) ⇒ void constructor private
- #inspect ⇒ String private
Constructor Details
#initialize(label = default_label) ⇒ 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.
21 22 23 |
# File 'lib/convenient_service/support/value.rb', line 21 def initialize(label = default_label) @label = label end |
Instance Attribute Details
#label ⇒ Object (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.
15 16 17 |
# File 'lib/convenient_service/support/value.rb', line 15 def label @label 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.
29 30 31 32 33 |
# File 'lib/convenient_service/support/value.rb', line 29 def ==(other) return unless other.instance_of?(self.class) label == other.label end |
#===(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.
39 40 41 |
# File 'lib/convenient_service/support/value.rb', line 39 def ===(other) self == other end |
#eql?(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.
53 54 55 56 57 |
# File 'lib/convenient_service/support/value.rb', line 53 def eql?(other) return unless other.instance_of?(self.class) label == other.label end |
#hash ⇒ Integer
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.
66 67 68 |
# File 'lib/convenient_service/support/value.rb', line 66 def hash [self.class, label].hash end |
#inspect ⇒ String
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.
73 74 75 76 77 78 |
# File 'lib/convenient_service/support/value.rb', line 73 def inspect return default_label if label.nil? return default_label if label.empty? label end |