Class: Glosbe::Meaning
- Inherits:
-
Object
- Object
- Glosbe::Meaning
- Defined in:
- lib/glosbe/meaning.rb
Instance Attribute Summary collapse
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(data) ⇒ Meaning
constructor
A new instance of Meaning.
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
#language ⇒ Object (readonly)
Returns the value of attribute language.
3 4 5 |
# File 'lib/glosbe/meaning.rb', line 3 def language @language end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
3 4 5 |
# File 'lib/glosbe/meaning.rb', line 3 def text @text end |