Class: Oxforddictionaries::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/oxforddictionaries/parser.rb

Overview

Parser class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeParser

Returns a new instance of Parser.



10
11
12
# File 'lib/oxforddictionaries/parser.rb', line 10

def initialize
  @word = ''
end

Instance Attribute Details

#wordObject

Returns the value of attribute word.



8
9
10
# File 'lib/oxforddictionaries/parser.rb', line 8

def word
  @word
end

Instance Method Details

#exist?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/oxforddictionaries/parser.rb', line 14

def exist?
  (regex =~ single_match) || (regex =~ plural_matches)
end