Class: Reddit::Vote
Instance Attribute Summary collapse
-
#submission ⇒ Object
readonly
Returns the value of attribute submission.
Attributes inherited from Base
Instance Method Summary collapse
-
#down ⇒ true, false
Downvote submission or comment.
-
#initialize(submission) ⇒ Vote
constructor
A new instance of Vote.
- #inspect ⇒ String
-
#up ⇒ true, false
Upvote submission or comment.
Methods inherited from Base
base_headers, #base_headers, #cookie, #logged_in?, #login, #logout, #modhash, #read, #user, #user_agent, user_agent, #user_id
Constructor Details
#initialize(submission) ⇒ Vote
Returns a new instance of Vote.
6 7 8 |
# File 'lib/ruby_reddit_api/vote.rb', line 6 def initialize(submission) @submission = submission end |
Instance Attribute Details
#submission ⇒ Object (readonly)
Returns the value of attribute submission.
4 5 6 |
# File 'lib/ruby_reddit_api/vote.rb', line 4 def submission @submission end |
Instance Method Details
#down ⇒ true, false
Downvote submission or comment
18 19 20 |
# File 'lib/ruby_reddit_api/vote.rb', line 18 def down vote(:down) end |
#inspect ⇒ String
23 24 25 |
# File 'lib/ruby_reddit_api/vote.rb', line 23 def inspect "<Reddit::Vote>" end |
#up ⇒ true, false
Upvote submission or comment
12 13 14 |
# File 'lib/ruby_reddit_api/vote.rb', line 12 def up vote(:up) end |