Class: Flipper::Type
- Inherits:
-
Object
- Object
- Flipper::Type
- Defined in:
- lib/flipper/type.rb
Overview
Internal: Root class for all flipper types. You should never need to use this.
Direct Known Subclasses
Flipper::Types::Actor, Flipper::Types::Boolean, Flipper::Types::Group, Flipper::Types::Percentage
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
9 10 11 |
# File 'lib/flipper/type.rb', line 9 def value @value end |
Class Method Details
.wrap(value_or_instance) ⇒ Object
4 5 6 7 |
# File 'lib/flipper/type.rb', line 4 def self.wrap(value_or_instance) return value_or_instance if value_or_instance.is_a?(self) new(value_or_instance) end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
11 12 13 |
# File 'lib/flipper/type.rb', line 11 def eql?(other) self.class.eql?(other.class) && value == other.value end |