Sha256: 02206770c93f257ac20371e8214624513e3b4bc355233a4b9310630cd332541e
Contents?: true
Size: 479 Bytes
Versions: 1
Compression:
Stored size: 479 Bytes
Contents
require 'forwardable' module FakeServiceBus 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fake_servicebus-0.0.2 | lib/fake_servicebus/collection_view.rb |