class Ruqqus::Guild

Represents a Ruqqus guild.

Public Instance Methods

banner_url() click to toggle source
color() click to toggle source
# File lib/ruqqus/types/guild.rb, line 87
def color
  @data[:color]
end
description() click to toggle source
# File lib/ruqqus/types/guild.rb, line 71
def description
  @data[:description]
end
description_html() click to toggle source
# File lib/ruqqus/types/guild.rb, line 79
def description_html
  @data[:description_html]
end
fullname() click to toggle source
# File lib/ruqqus/types/guild.rb, line 103
def fullname
  @data[:fullname]
end
guildmaster_count() click to toggle source
# File lib/ruqqus/types/guild.rb, line 99
def guildmaster_count
  @data[:mods_count]&.to_i || 0
end
guildmasters() click to toggle source
# File lib/ruqqus/types/guild.rb, line 107
def guildmasters
  return Array.new unless @data[:guildmasters]
  @data[:guildmasters].map { |gm| User.from_json(gm) }
end
member_count() click to toggle source
# File lib/ruqqus/types/guild.rb, line 95
def member_count
  @data[:subscriber_count]&.to_i || 0
end
name() click to toggle source
# File lib/ruqqus/types/guild.rb, line 91
def name
  @data[:name]
end
nsfw?() click to toggle source

@return [Boolean] `true` if the guild contains adult content and flagged as NSFW, otherwise `false`.

# File lib/ruqqus/types/guild.rb, line 49
def nsfw?
  @data[:over_18]
end
private?() click to toggle source

@return [Boolean] `true` if guild is private and required membership to view content, otherwise `false`.

# File lib/ruqqus/types/guild.rb, line 55
def private?
  !!@data[:is_private]
end
profile_url() click to toggle source
# File lib/ruqqus/types/guild.rb, line 83
def profile_url
  @data[:profile_url]
end
restricted?() click to toggle source

@return [Boolean] `true` if posting is restricted byy guild masters, otherwise `false`.

# File lib/ruqqus/types/guild.rb, line 61
def restricted?
  !!@data[:is_restricted]
end
to_s() click to toggle source

@return [String] the string representation of the object.

# File lib/ruqqus/types/guild.rb, line 67
def to_s
  @data[:name] || inspect
end