class MetaEnum::MissingElement
Attributes
type[R]
value[R]
Public Class Methods
new(value, type)
click to toggle source
# File lib/meta_enum/missing_element.rb, line 5 def initialize(value, type) @value = value @type = type freeze end
Public Instance Methods
==(other)
click to toggle source
# File lib/meta_enum/missing_element.rb, line 14 def ==(other) other = type[other] value == other.value && type == other.type # type[] will raise for certain bad keys. Those are obviously not equal so return false. rescue ArgumentError, KeyError false end
data()
click to toggle source
# File lib/meta_enum/missing_element.rb, line 12 def data; nil; end
inspect()
click to toggle source
# File lib/meta_enum/missing_element.rb, line 25 def inspect "#<#{self.class}: #{value.inspect}}>" end
name()
click to toggle source
# File lib/meta_enum/missing_element.rb, line 11 def name; :missing_value; end
to_s()
click to toggle source
# File lib/meta_enum/missing_element.rb, line 23 def to_s; name.to_s; end