Class: Ruqqus::Guild
Overview
Represents a Ruqqus guild.
Instance Attribute Summary collapse
-
#banner_url ⇒ String
readonly
The URL for the banner image associated with the guild.
-
#color ⇒ String
readonly
The accent color used for the guild, in HTML format.
-
#description ⇒ String
readonly
The description of the guild.
-
#description_html ⇒ String
readonly
The description of the guild in HTML format.
-
#fullname ⇒ String
readonly
The full ID of the guild.
-
#guildmaster_count ⇒ Integer
readonly
The number of guild masters who moderate this guild.
-
#guildmasters ⇒ Array<User>
readonly
An array of User instances of the moderators for this guild.
-
#member_count ⇒ Integer
readonly
The number of members subscribed to the guild.
-
#name ⇒ String
readonly
The name of the guild.
-
#profile_url ⇒ String
readonly
The URL for the profile image associated with the guild.
Attributes inherited from ItemBase
#created, #created_utc, #id, #permalink
Instance Method Summary collapse
-
#nsfw? ⇒ Boolean
true
if the guild contains adult content and flagged as NSFW, otherwisefalse
. -
#private? ⇒ Boolean
true
if guild is private and required membership to view content, otherwisefalse
. -
#restricted? ⇒ Boolean
true
if posting is restricted byy guild masters, otherwisefalse
. -
#to_s ⇒ String
The string representation of the object.
Methods inherited from ItemBase
Instance Attribute Details
#banner_url ⇒ String (readonly)
Returns the URL for the banner image associated with the guild.
|
# File 'lib/ruqqus/types/guild.rb', line 39
|
#color ⇒ String (readonly)
Returns the accent color used for the guild, in HTML format.
|
# File 'lib/ruqqus/types/guild.rb', line 27
|
#description ⇒ String (readonly)
Returns the description of the guild.
|
# File 'lib/ruqqus/types/guild.rb', line 31
|
#description_html ⇒ String (readonly)
Returns the description of the guild in HTML format.
|
# File 'lib/ruqqus/types/guild.rb', line 35
|
#fullname ⇒ String (readonly)
Returns the full ID of the guild.
|
# File 'lib/ruqqus/types/guild.rb', line 15
|
#guildmaster_count ⇒ Integer (readonly)
Returns the number of guild masters who moderate this guild.
|
# File 'lib/ruqqus/types/guild.rb', line 19
|
#guildmasters ⇒ Array<User> (readonly)
Returns an array of User instances of the moderators for this guild.
|
# File 'lib/ruqqus/types/guild.rb', line 43
|
#member_count ⇒ Integer (readonly)
Returns the number of members subscribed to the guild.
|
# File 'lib/ruqqus/types/guild.rb', line 11
|
#name ⇒ String (readonly)
Returns the name of the guild.
|
# File 'lib/ruqqus/types/guild.rb', line 7
|
#profile_url ⇒ String (readonly)
Returns the URL for the profile image associated with the guild.
|
# File 'lib/ruqqus/types/guild.rb', line 23
|
Instance Method Details
#nsfw? ⇒ Boolean
Returns true
if the guild contains adult content and flagged as NSFW, otherwise false
.
49 50 51 |
# File 'lib/ruqqus/types/guild.rb', line 49 def nsfw? @data[:over_18] end |
#private? ⇒ Boolean
Returns true
if guild is private and required membership to view content, otherwise false
.
55 56 57 |
# File 'lib/ruqqus/types/guild.rb', line 55 def private? !!@data[:is_private] end |
#restricted? ⇒ Boolean
Returns true
if posting is restricted byy guild masters, otherwise false
.
61 62 63 |
# File 'lib/ruqqus/types/guild.rb', line 61 def restricted? !!@data[:is_restricted] end |
#to_s ⇒ String
Returns the string representation of the object.
67 68 69 |
# File 'lib/ruqqus/types/guild.rb', line 67 def to_s @data[:name] || inspect end |