lib/rumonade/lazy_identity.rb in rumonade-0.1.0 vs lib/rumonade/lazy_identity.rb in rumonade-0.1.1

- old
+ new

@@ -1,6 +1,6 @@ # Adapted from http://stackoverflow.com/questions/2709361/monad-equivalent-in-ruby -class LazyIdentity +class LazyIdentity # :nodoc: def initialize(lam = nil, &blk) @lazy = lam || blk @lazy.is_a?(Proc) || raise(ArgumentError, "not a Proc") @lazy.arity.zero? || raise(ArgumentError, "arity must be 0, was #{@lazy.arity}") end