Class: Stacked::Reputation

Inherits:
Base
  • Object
show all
Defined in:
lib/stacked/reputation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, association, collection, find, #initialize, #parse_answers, #parse_badges, #parse_comments, #parse_post_timeline, #parse_questions, #parse_reputations, #parse_tags, #parse_type, #parse_user_timeline, #post, records, request, singular, stats

Constructor Details

This class inherits a constructor from Stacked::Base

Instance Attribute Details

#negative_repObject

Returns the value of attribute negative_rep.



3
4
5
# File 'lib/stacked/reputation.rb', line 3

def negative_rep
  @negative_rep
end

#on_dateObject

Returns the value of attribute on_date.



3
4
5
# File 'lib/stacked/reputation.rb', line 3

def on_date
  @on_date
end

#positive_repObject

Returns the value of attribute positive_rep.



3
4
5
# File 'lib/stacked/reputation.rb', line 3

def positive_rep
  @positive_rep
end

#post_idObject

Returns the value of attribute post_id.



3
4
5
# File 'lib/stacked/reputation.rb', line 3

def post_id
  @post_id
end

#post_typeObject

Returns the value of attribute post_type.



3
4
5
# File 'lib/stacked/reputation.rb', line 3

def post_type
  @post_type
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/stacked/reputation.rb', line 3

def title
  @title
end

Instance Method Details

#scoreObject

Return the cumulative score of this reputation.



11
12
13
# File 'lib/stacked/reputation.rb', line 11

def score
  positive_rep - negative_rep
end