Class: ShotApiGem::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/shot_api_gem/link.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Link

Returns a new instance of Link.



14
15
16
17
18
19
20
21
22
23
# File 'lib/shot_api_gem/link.rb', line 14

def initialize(params)
  @id = params[:id]
  @url = params[:url]
  @slug = params[:slug]
  @active = params[:active]
  @clicks = params[:clicks]
  @title = params[:title]
  @date_created = params[:date_created]
  @date_updated = params[:date_updated]
end

Instance Attribute Details

#activeObject (readonly)

Returns the value of attribute active.



3
4
5
# File 'lib/shot_api_gem/link.rb', line 3

def active
  @active
end

#clicksObject (readonly)

Returns the value of attribute clicks.



3
4
5
# File 'lib/shot_api_gem/link.rb', line 3

def clicks
  @clicks
end

#date_createdObject (readonly)

Returns the value of attribute date_created.



3
4
5
# File 'lib/shot_api_gem/link.rb', line 3

def date_created
  @date_created
end

#date_updatedObject (readonly)

Returns the value of attribute date_updated.



3
4
5
# File 'lib/shot_api_gem/link.rb', line 3

def date_updated
  @date_updated
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/shot_api_gem/link.rb', line 3

def id
  @id
end

#slugObject (readonly)

Returns the value of attribute slug.



3
4
5
# File 'lib/shot_api_gem/link.rb', line 3

def slug
  @slug
end

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/shot_api_gem/link.rb', line 3

def title
  @title
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/shot_api_gem/link.rb', line 3

def url
  @url
end