Class: Maybe

Inherits:
Object
  • Object
show all
Defined in:
lib/possibly.rb

Direct Known Subclasses

None, Some

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object Also known as: eql?


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

def ==(other)
  other.class == self.class
end

#inspectObject


21
22
23
# File 'lib/possibly.rb', line 21

def inspect
  to_s
end

#to_aryObject Also known as: to_a


11
12
13
# File 'lib/possibly.rb', line 11

def to_ary
  __enumerable_value
end