Class: ReplTalk::Language
- Inherits:
-
Object
- Object
- ReplTalk::Language
- Defined in:
- lib/repltalk/structures.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tagline ⇒ Object
readonly
Returns the value of attribute tagline.
Instance Method Summary collapse
-
#initialize(lang) ⇒ Language
constructor
A new instance of Language.
- #to_s ⇒ Object
Constructor Details
#initialize(lang) ⇒ Language
Returns a new instance of Language.
24 25 26 27 28 29 30 31 |
# File 'lib/repltalk/structures.rb', line 24 def initialize(lang) @id = lang["id"] @key = lang["key"] @name = lang["displayName"] @tagline = lang["tagline"] @icon = lang["icon"] @category = lang["category"] end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
22 23 24 |
# File 'lib/repltalk/structures.rb', line 22 def category @category end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
22 23 24 |
# File 'lib/repltalk/structures.rb', line 22 def icon @icon end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
22 23 24 |
# File 'lib/repltalk/structures.rb', line 22 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
22 23 24 |
# File 'lib/repltalk/structures.rb', line 22 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
22 23 24 |
# File 'lib/repltalk/structures.rb', line 22 def name @name end |
#tagline ⇒ Object (readonly)
Returns the value of attribute tagline.
22 23 24 |
# File 'lib/repltalk/structures.rb', line 22 def tagline @tagline end |
Instance Method Details
#to_s ⇒ Object
33 34 35 |
# File 'lib/repltalk/structures.rb', line 33 def to_s @id end |