Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add like.rb and like_spec.rb

  • Loading branch information...
commit 5edf6a8852561d40f8839d07eaba6700bcdab4e6 1 parent a307a43
@nov authored
Showing with 22 additions and 0 deletions.
  1. +15 −0 lib/smartfm/model/like.rb
  2. +7 −0 spec/smartfm/model/like_spec.rb
View
15 lib/smartfm/model/like.rb
@@ -0,0 +1,15 @@
+class Smartfm::Like < Smartfm::Base
+ ATTRIBUTES = [:id, :type, :title, :description, :href, :favorite, :user]
+ attr_reader *ATTRIBUTES
+
+ def initialize(params)
+ @id = params[:id]
+ @type = params[:user]
+ @title = params[:title]
+ @description = params[:description]
+ @href = params[:href]
+ @favorite = params[:favorite]
+ @user = self.deserialize(params[:user], :as => Smartfm::User)
+ end
+
+end
View
7 spec/smartfm/model/like_spec.rb
@@ -0,0 +1,7 @@
+require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
+
+describe String do
+ it "should respond to length" do
+ "hoge".should respond_to(:length)
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.