Fix little things
This commit is contained in:
parent
ba6c12ad89
commit
496e96be91
|
@ -51,8 +51,6 @@ module Rubella
|
|||
# Returns the current length of the storage.
|
||||
# (How many datasets it holds.)
|
||||
#
|
||||
# TODO Throw an error, if data has different lengths
|
||||
#
|
||||
# @return Integer length
|
||||
#
|
||||
def length
|
||||
|
@ -62,6 +60,8 @@ module Rubella
|
|||
# Returns the length of a dataset.
|
||||
# Will return 0, if no datasets in storage.
|
||||
#
|
||||
# TODO Throw an error, if data has different lengths
|
||||
#
|
||||
# @return Integer length of one dataset
|
||||
#
|
||||
def dataset_length
|
||||
|
|
|
@ -8,4 +8,4 @@ describe Rubella::Input::Base, '.data' do
|
|||
expect(input.data).to eq([3, 4, 5])
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,10 +3,10 @@ require 'spec_helper'
|
|||
describe Rubella::Input::Base, '.each' do
|
||||
|
||||
it "passes the data through the given block" do
|
||||
storage = Rubella::Input::Base.new [3, 4, 5]
|
||||
input = Rubella::Input::Base.new [3, 4, 5]
|
||||
|
||||
sum = 0
|
||||
storage.each do |value|
|
||||
input.each do |value|
|
||||
sum = sum + value
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue