Class: Dribble::Shot
Instance Attribute Summary collapse
-
#comments_count ⇒ Object
readonly
Returns the value of attribute comments_count.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#image_teaser_url ⇒ Object
readonly
Returns the value of attribute image_teaser_url.
-
#image_url ⇒ Object
readonly
Returns the value of attribute image_url.
-
#likes_count ⇒ Object
readonly
Returns the value of attribute likes_count.
-
#player ⇒ Object
readonly
Returns the value of attribute player.
-
#rebounds_count ⇒ Object
readonly
Returns the value of attribute rebounds_count.
-
#short_url ⇒ Object
readonly
Returns the value of attribute short_url.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#views_count ⇒ Object
readonly
Returns the value of attribute views_count.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Class Method Summary collapse
-
.debuts(options = {}) ⇒ Object
Debuts.
-
.everyones(options = {}) ⇒ Object
Everyones.
-
.following(id, options = {}) ⇒ Object
Following.
-
.for(id) ⇒ Object
By ID.
-
.popular(options = {}) ⇒ Object
Popular.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Shot
constructor
A new instance of Shot.
Constructor Details
#initialize(attributes = {}) ⇒ Shot
Returns a new instance of Shot.
8 9 10 11 12 13 |
# File 'lib/dribble/shot.rb', line 8 def initialize(attributes={}) attributes.each do |key, value| instance_variable_set("@#{key}", value) end @player = Dribble::Player.new(attributes[:player]) if attributes[:player] end |
Instance Attribute Details
#comments_count ⇒ Object (readonly)
Returns the value of attribute comments_count.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def comments_count @comments_count end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def created_at @created_at end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def height @height end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def id @id end |
#image_teaser_url ⇒ Object (readonly)
Returns the value of attribute image_teaser_url.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def @image_teaser_url end |
#image_url ⇒ Object (readonly)
Returns the value of attribute image_url.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def image_url @image_url end |
#likes_count ⇒ Object (readonly)
Returns the value of attribute likes_count.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def likes_count @likes_count end |
#player ⇒ Object (readonly)
Returns the value of attribute player.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def player @player end |
#rebounds_count ⇒ Object (readonly)
Returns the value of attribute rebounds_count.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def rebounds_count @rebounds_count end |
#short_url ⇒ Object (readonly)
Returns the value of attribute short_url.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def short_url @short_url end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def url @url end |
#views_count ⇒ Object (readonly)
Returns the value of attribute views_count.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def views_count @views_count end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
3 4 5 |
# File 'lib/dribble/shot.rb', line 3 def width @width end |
Class Method Details
.debuts(options = {}) ⇒ Object
Debuts
65 66 67 68 |
# File 'lib/dribble/shot.rb', line 65 def self.debuts(={}) results = Dribble::API::Shot.debuts() Dribble::Debuts.new(format_shots(results), results) end |
.everyones(options = {}) ⇒ Object
Everyones
50 51 52 53 |
# File 'lib/dribble/shot.rb', line 50 def self.everyones(={}) results = Dribble::API::Shot.everyones() Dribble::Everyones.new(format_shots(results), results) end |
.following(id, options = {}) ⇒ Object
Following
35 36 37 38 |
# File 'lib/dribble/shot.rb', line 35 def self.following(id, ={}) results = Dribble::API::Shot.following(id, ) Dribble::Following.new(format_shots(results), results.merge(:player_name => id)) end |