Class: Trither::Box

Inherits:
Object
  • Object
show all
Includes:
Contracts::Core
Defined in:
lib/trither.rb

Constant Summary collapse

C =
Contracts

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Box

Returns a new instance of Box.



10
11
12
# File 'lib/trither.rb', line 10

def initialize(value)
  @value = value
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
18
# File 'lib/trither.rb', line 15

def ==(other)
  (self.class == other.class) &&
    (@value == other.instance_variable_get('@value'))
end