Class: OxfordLearnersDictionaries::WordOfTheDay

Inherits:
Object
  • Object
show all
Defined in:
lib/oxford_learners_dictionaries/word_of_the_day.rb

Constant Summary collapse

URL =
"http://www.oxfordlearnersdictionaries.com"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWordOfTheDay

Returns a new instance of WordOfTheDay.



10
11
12
# File 'lib/oxford_learners_dictionaries/word_of_the_day.rb', line 10

def initialize
  parse
end

Instance Attribute Details

#englishObject (readonly)

Returns the value of attribute english.



6
7
8
# File 'lib/oxford_learners_dictionaries/word_of_the_day.rb', line 6

def english
  @english
end

#short_definitionObject (readonly)

Returns the value of attribute short_definition.



6
7
8
# File 'lib/oxford_learners_dictionaries/word_of_the_day.rb', line 6

def short_definition
  @short_definition
end

#wordObject (readonly)

Returns the value of attribute word.



6
7
8
# File 'lib/oxford_learners_dictionaries/word_of_the_day.rb', line 6

def word
  @word
end

Instance Method Details

#look_upObject



14
15
16
# File 'lib/oxford_learners_dictionaries/word_of_the_day.rb', line 14

def look_up
  @english = English.new(word).look_up if word
end