Skip to content
Browse files

Merge pull request #7 from vgololobov/master

circular dependency removed
  • Loading branch information...
2 parents c482107 + 81305c0 commit 09dd828d8f065eff1f60a93207c66b7682e498b7 Chris Le committed Apr 30, 2012
Showing with 60 additions and 0 deletions.
  1. +12 −0 Gemfile.lock
  2. +32 −0 Gemfile.lock.orig
  3. +12 −0 lib/gattica/data_point.rb
  4. +4 −0 lib/gattica/data_set.rb
View
12 Gemfile.lock
@@ -1,20 +1,32 @@
PATH
remote: .
specs:
+<<<<<<< HEAD
+ gattica (0.5.1)
+=======
gattica (0.6.0)
gattica
+>>>>>>> upstream/master
hpricot
test-unit
GEM
remote: http://rubygems.org/
specs:
hpricot (0.8.6)
+<<<<<<< HEAD
+ rake (0.9.2.2)
+=======
+>>>>>>> upstream/master
test-unit (2.4.5)
PLATFORMS
ruby
DEPENDENCIES
+<<<<<<< HEAD
+ rake
+=======
gattica!
+>>>>>>> upstream/master
test-unit
View
32 Gemfile.lock.orig
@@ -0,0 +1,32 @@
+PATH
+ remote: .
+ specs:
+<<<<<<< HEAD
+ gattica (0.5.1)
+=======
+ gattica (0.6.0)
+ gattica
+>>>>>>> upstream/master
+ hpricot
+ test-unit
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ hpricot (0.8.6)
+<<<<<<< HEAD
+ rake (0.9.2.2)
+=======
+>>>>>>> upstream/master
+ test-unit (2.4.5)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+<<<<<<< HEAD
+ rake
+=======
+ gattica!
+>>>>>>> upstream/master
+ test-unit
View
12 lib/gattica/data_point.rb
@@ -55,6 +55,18 @@ def to_yaml
'dimensions' => @dimensions,
'metrics' => @metrics }.to_yaml
end
+
+ def to_hash
+
+ res_hash = {}
+
+ @dimensions.each{|d| res_hash.merge!(d) }
+ # output all metrics
+ @metrics.each{|m| res_hash.merge!(m) }
+ res_hash
+
+ end
+
end
View
4 lib/gattica/data_set.rb
@@ -48,6 +48,10 @@ def to_yaml
'points' => @points }.to_yaml
end
+ def to_hash
+ @points.map(&:to_hash)
+ end
+
end
end

0 comments on commit 09dd828

Please sign in to comment.
Something went wrong with that request. Please try again.