Module: NeonRAW::Objects::Thing::Gildable
- Included in:
- Comment, Submission
- Defined in:
- lib/NeonRAW/objects/thing/gildable.rb
Overview
Methods for things that can be gilded.
Instance Method Summary collapse
-
#gild(quantity) ⇒ Object
Give a thing gold.
-
#gilded? ⇒ Boolean
Checks whether a comment was gilded or not.
Instance Method Details
#gild(quantity) ⇒ Object
Give a thing gold.
20 21 22 23 24 25 |
# File 'lib/NeonRAW/objects/thing/gildable.rb', line 20 def gild(quantity) quantity.times do @client.request_data("/api/v1/gold/gild/#{name}", :post) end refresh! end |
#gilded? ⇒ Boolean
Checks whether a comment was gilded or not.
9 10 11 12 13 14 15 |
# File 'lib/NeonRAW/objects/thing/gildable.rb', line 9 def gilded? if @gilded > 0 true else false end end |