Class: Glosbe::Meaning

Inherits:
Object
  • Object
show all
Defined in:
lib/glosbe/meaning.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Meaning

Returns a new instance of Meaning.



5
6
7
8
# File 'lib/glosbe/meaning.rb', line 5

def initialize(data)
  @language = data["language"]
  @text = data["text"] ? CGI.unescapeHTML(data["text"]) : nil
end

Instance Attribute Details

#languageObject (readonly)

Returns the value of attribute language.



3
4
5
# File 'lib/glosbe/meaning.rb', line 3

def language
  @language
end

#textObject (readonly)

Returns the value of attribute text.



3
4
5
# File 'lib/glosbe/meaning.rb', line 3

def text
  @text
end