Class: Lingq::Word
- Inherits:
-
Object
- Object
- Lingq::Word
- Defined in:
- lib/lingq/word.rb
Instance Attribute Summary collapse
-
#fragment ⇒ Object
readonly
Returns the value of attribute fragment.
-
#hint ⇒ Object
readonly
Returns the value of attribute hint.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#term ⇒ Object
readonly
Returns the value of attribute term.
Instance Method Summary collapse
-
#initialize(language_code, json) ⇒ Word
constructor
A new instance of Word.
Constructor Details
#initialize(language_code, json) ⇒ Word
Returns a new instance of Word.
4 5 6 7 8 9 10 11 |
# File 'lib/lingq/word.rb', line 4 def initialize(language_code,json) @language = language_code @hint = json["hint"] @term = json["term"] @id = json["id"] @fragment = json["fragment"] @status = json["status"] end |
Instance Attribute Details
#fragment ⇒ Object (readonly)
Returns the value of attribute fragment.
3 4 5 |
# File 'lib/lingq/word.rb', line 3 def fragment @fragment end |
#hint ⇒ Object (readonly)
Returns the value of attribute hint.
3 4 5 |
# File 'lib/lingq/word.rb', line 3 def hint @hint end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/lingq/word.rb', line 3 def id @id end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
3 4 5 |
# File 'lib/lingq/word.rb', line 3 def language @language end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/lingq/word.rb', line 3 def status @status end |
#term ⇒ Object (readonly)
Returns the value of attribute term.
3 4 5 |
# File 'lib/lingq/word.rb', line 3 def term @term end |