Permalink
Browse files

Enumerable Result.

  • Loading branch information...
1 parent abf8e37 commit 132c630df95ee4d7c79966e5b4b631b790fd7460 @jnunemaker jnunemaker committed Nov 14, 2012
Showing with 7 additions and 0 deletions.
  1. +2 −0 lib/cassandra-cql/result.rb
  2. +5 −0 spec/result_spec.rb
@@ -37,6 +37,8 @@ def initialize(schema)
end
class Result
+ include Enumerable
+
attr_reader :result, :schema, :cursor
def initialize(result)
View
@@ -186,4 +186,9 @@
end
end
end
+
+ it "is enumerable" do
+ @result.class.ancestors.should include(Enumerable)
+ @result.map { |row| row['col1'] }.should eq(['val1', nil])
+ end
end

0 comments on commit 132c630

Please sign in to comment.