Class: Lingq::Word

Inherits:
Object
  • Object
show all
Defined in:
lib/lingq/word.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fragmentObject (readonly)

Returns the value of attribute fragment.



3
4
5
# File 'lib/lingq/word.rb', line 3

def fragment
  @fragment
end

#hintObject (readonly)

Returns the value of attribute hint.



3
4
5
# File 'lib/lingq/word.rb', line 3

def hint
  @hint
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/lingq/word.rb', line 3

def id
  @id
end

#languageObject (readonly)

Returns the value of attribute language.



3
4
5
# File 'lib/lingq/word.rb', line 3

def language
  @language
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/lingq/word.rb', line 3

def status
  @status
end

#termObject (readonly)

Returns the value of attribute term.



3
4
5
# File 'lib/lingq/word.rb', line 3

def term
  @term
end