Class: MaybeChain::Nothing

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/maybe-chain.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



80
81
82
83
# File 'lib/maybe-chain.rb', line 80

def method_missing(method, *args, &block)
  rescuables = args.first || []
  MaybeWrapper.new(self, rescuables)
end

Instance Method Details

#inspectObject



72
73
74
# File 'lib/maybe-chain.rb', line 72

def inspect
  "Nothing"
end

#to_sObject



76
77
78
# File 'lib/maybe-chain.rb', line 76

def to_s
  "Nothing"
end