class DBio::DiscordConnection
Find information about a Discord Connection.
Public Class Methods
new(data)
click to toggle source
Initialize the connection
# File lib/dbio/discord_connection.rb, line 4 def initialize(data) @data = data end
Public Instance Methods
icon()
click to toggle source
The icon is used on the website, it's a Font Awesome icon code. Not really useful unless you're making a site with the gem, in which case you'd probably do: <a href=“<%= @connection.url %>”><i class=“<%= @connection.icon %>”></i> <%= @connection.name %></a> Which could return: <a href=“twitter.com/twitter”> class=“fab fa-twitter”></i> Twitter</a> @return [String] the font awesome icon code for this connection
# File lib/dbio/discord_connection.rb, line 30 def icon @data['icon'] end
name()
click to toggle source
@return [String] the name as it appears on the Discord profile
# File lib/dbio/discord_connection.rb, line 15 def name @data['name'] end
type()
click to toggle source
The type of Discord connection, e.g. Twitter, YouTube, etc. @return [String] the type of connection
# File lib/dbio/discord_connection.rb, line 10 def type @data['connection_type'] end
url()
click to toggle source
@return [String] the URL to the connection as it is on the Discord profile
# File lib/dbio/discord_connection.rb, line 20 def url @data['url'] end