class LunaPark::Values::Single

Attributes

value[R]

Public Class Methods

new(value) click to toggle source
# File lib/luna_park/values/single.rb, line 14
def initialize(value)
  @value = value
end
wrap(input) click to toggle source
# File lib/luna_park/values/single.rb, line 8
def self.wrap(input)
  return input if input.is_a?(self)

  raise Errors::Unwrapable, "#{self} can not wrap #{input.class}"
end

Public Instance Methods

==(other) click to toggle source
# File lib/luna_park/values/single.rb, line 18
def ==(other)
  value == other.value
end
inspect() click to toggle source
# File lib/luna_park/values/single.rb, line 26
def inspect
  "#<#{self.class} #{value.inspect}>"
end
serialize() click to toggle source
# File lib/luna_park/values/single.rb, line 22
def serialize
  value
end