Class: Ruqqus::Title

Inherits:
Object
  • Object
show all
Defined in:
lib/ruqqus/types/title.rb

Overview

Describes a title associated with a username.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Title

Creates a new instance of the Ruqqus::Title class.

Parameters:

  • data (Hash)

    the parsed JSON payload defining this instance.



28
29
30
# File 'lib/ruqqus/types/title.rb', line 28

def initialize(data)
  @data = data || raise(ArgumentError, 'data cannot be nil')
end

Instance Attribute Details

#colorString (readonly)

Returns the color used to display the title in HTML format.

Returns:

  • (String)

    the color used to display the title in HTML format.



# File 'lib/ruqqus/types/title.rb', line 16

#idInteger (readonly)

Returns a unique ID associated with this title.

Returns:

  • (Integer)

    a unique ID associated with this title.



# File 'lib/ruqqus/types/title.rb', line 8

#kindInteger (readonly)

Returns an integer determining the "rank" of the title.

Returns:

  • (Integer)

    an integer determining the "rank" of the title.



# File 'lib/ruqqus/types/title.rb', line 20

#textString (readonly)

Returns the text value of the title.

Returns:

  • (String)

    the text value of the title.



# File 'lib/ruqqus/types/title.rb', line 12