module NeonRAW::Objects::Thing::Gildable

Methods for things that can be gilded.

Public Instance Methods

gild(quantity) click to toggle source

Give a thing gold. @!method gild(quantity) @param quantity [Integer] The amount of gold to give.

# 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?() click to toggle source

Checks whether a comment was gilded or not. @!method gilded? @return [Boolean] Returns whether or not the comment was gilded.

# File lib/NeonRAW/objects/thing/gildable.rb, line 9
def gilded?
  if @gilded > 0
    true
  else
    false
  end
end