Class: Smartfm::Like

Inherits:
Base
  • Object
show all
Includes:
PrivateContent
Defined in:
lib/smartfm/models/like.rb

Constant Summary collapse

ATTRIBUTES =
[:id, :type, :title, :description, :href, :favorite, :user]

Class Method Summary collapse

Instance Method Summary collapse

Methods included from PrivateContent

included

Methods inherited from Base

attributes, #attributes

Constructor Details

#initialize(params) ⇒ Like

Returns a new instance of Like.



10
11
12
13
14
15
16
17
18
# File 'lib/smartfm/models/like.rb', line 10

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

Class Method Details

.rest_clientObject



7
# File 'lib/smartfm/models/like.rb', line 7

def self.rest_client; Smartfm::RestClient::Like; end

Instance Method Details

#rest_clientObject



8
# File 'lib/smartfm/models/like.rb', line 8

def rest_client; self.class.rest_client; end