Class: ShotApiGem::Link
- Inherits:
-
Object
- Object
- ShotApiGem::Link
- Defined in:
- lib/shot_api_gem/link.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#clicks ⇒ Object
readonly
Returns the value of attribute clicks.
-
#date_created ⇒ Object
readonly
Returns the value of attribute date_created.
-
#date_updated ⇒ Object
readonly
Returns the value of attribute date_updated.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(params) ⇒ Link
constructor
A new instance of Link.
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
#active ⇒ Object (readonly)
Returns the value of attribute active.
3 4 5 |
# File 'lib/shot_api_gem/link.rb', line 3 def active @active end |
#clicks ⇒ Object (readonly)
Returns the value of attribute clicks.
3 4 5 |
# File 'lib/shot_api_gem/link.rb', line 3 def clicks @clicks end |
#date_created ⇒ Object (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_updated ⇒ Object (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 |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/shot_api_gem/link.rb', line 3 def id @id end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
3 4 5 |
# File 'lib/shot_api_gem/link.rb', line 3 def slug @slug end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/shot_api_gem/link.rb', line 3 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/shot_api_gem/link.rb', line 3 def url @url end |