Class: Spec::Expectations::Helper::CollectionWithSizeMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/vendor/plugins/rspec/spec/support/spec_classes.rb

Instance Method Summary collapse

Constructor Details

#initializeCollectionWithSizeMethod

Returns a new instance of CollectionWithSizeMethod.



22
# File 'lib/vendor/plugins/rspec/spec/support/spec_classes.rb', line 22

def initialize; @list = []; end

Instance Method Details

#push(item) ⇒ Object



24
# File 'lib/vendor/plugins/rspec/spec/support/spec_classes.rb', line 24

def push(item); @list.push(item); end

#sizeObject



23
# File 'lib/vendor/plugins/rspec/spec/support/spec_classes.rb', line 23

def size; @list.size; end