Permalink
Browse files

Added the Cameraplus::PhotoRecipe class.

  • Loading branch information...
1 parent ca9487d commit 75cceb7dfe8c2b4a9043dba2d27ea80db208ad2d @kevintuhumury kevintuhumury committed Mar 20, 2012
Showing with 32 additions and 0 deletions.
  1. +1 −0 lib/cameraplus.rb
  2. +12 −0 lib/cameraplus/photo_recipe.rb
  3. +19 −0 spec/cameraplus/photo_recipe_spec.rb
View
@@ -9,5 +9,6 @@
require "cameraplus/page"
require "cameraplus/photo"
require "cameraplus/photo_exif"
+require "cameraplus/photo_recipe"
require "cameraplus/comment"
require "cameraplus/version"
@@ -0,0 +1,12 @@
+module Cameraplus
+ class PhotoRecipe
+
+ attr_reader :type, :value
+
+ def initialize(data)
+ @type = data.type
+ @value = data.value
+ end
+
+ end
+end
@@ -0,0 +1,19 @@
+require "spec_helper"
+
+describe Cameraplus::PhotoRecipe do
+
+ let(:data) do
+ { :type => "fx", :value => "Vibrant" }
+ end
+
+ subject { Cameraplus::PhotoRecipe.new data }
+
+ it "should have a type" do
+ subject.type.should eq "fx"
+ end
+
+ it "should have a value" do
+ subject.value.should eq "Vibrant"
+ end
+
+end

0 comments on commit 75cceb7

Please sign in to comment.