Class: ReplTalk::Language

Inherits:
Object
  • Object
show all
Defined in:
lib/repltalk/structures.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#categoryObject (readonly)

Returns the value of attribute category.



22
23
24
# File 'lib/repltalk/structures.rb', line 22

def category
  @category
end

#iconObject (readonly)

Returns the value of attribute icon.



22
23
24
# File 'lib/repltalk/structures.rb', line 22

def icon
  @icon
end

#idObject (readonly)

Returns the value of attribute id.



22
23
24
# File 'lib/repltalk/structures.rb', line 22

def id
  @id
end

#keyObject (readonly)

Returns the value of attribute key.



22
23
24
# File 'lib/repltalk/structures.rb', line 22

def key
  @key
end

#nameObject (readonly)

Returns the value of attribute name.



22
23
24
# File 'lib/repltalk/structures.rb', line 22

def name
  @name
end

#taglineObject (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_sObject



33
34
35
# File 'lib/repltalk/structures.rb', line 33

def to_s
  @id
end