Class: Spec::Expectations::Helper::CollectionWithLengthMethod

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

Instance Method Summary collapse

Constructor Details

#initializeCollectionWithLengthMethod

Returns a new instance of CollectionWithLengthMethod.



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

def initialize; @list = []; end

Instance Method Details

#lengthObject



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

def length; @list.size; end

#push(item) ⇒ Object



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

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