Class: FakeSQS::CollectionView

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/fake_sqs/collection_view.rb

Constant Summary collapse

UnmodifiableObjectError =
Class.new(StandardError)

Instance Method Summary collapse

Constructor Details

#initialize(original) ⇒ CollectionView

Returns a new instance of CollectionView.



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

def initialize( original )
  @original = original
end

Instance Method Details

#[]=(key_or_index, value) ⇒ Object



15
16
17
# File 'lib/fake_sqs/collection_view.rb', line 15

def []=(key_or_index,value)
  raise UnmodifiableObjectError.new("This is a collection view and can not be modified - #{key_or_index} => #{value}")
end