Sha256: a3818240bdedd524fa259cd02f75e63f9ae117792e13f7da4c28e5cf26e1ca37
Contents?: true
Size: 471 Bytes
Versions: 8
Compression:
Stored size: 471 Bytes
Contents
require 'forwardable' module FakeSQS class CollectionView include Enumerable extend Forwardable def_delegators :@original, :[], :each, :empty?, :size, :length UnmodifiableObjectError = Class.new(StandardError) def initialize( original ) @original = original end def []=(key_or_index,value) raise UnmodifiableObjectError.new("This is a collection view and can not be modified - #{key_or_index} => #{value}") end end end
Version data entries
8 entries across 8 versions & 1 rubygems