Class: Oxforddictionaries::Parser
- Inherits:
-
Object
- Object
- Oxforddictionaries::Parser
- Defined in:
- lib/oxforddictionaries/parser.rb
Overview
Parser class
Instance Attribute Summary collapse
-
#word ⇒ Object
Returns the value of attribute word.
Instance Method Summary collapse
- #exist? ⇒ Boolean
-
#initialize ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize ⇒ Parser
Returns a new instance of Parser.
10 11 12 |
# File 'lib/oxforddictionaries/parser.rb', line 10 def initialize @word = '' end |
Instance Attribute Details
#word ⇒ Object
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
14 15 16 |
# File 'lib/oxforddictionaries/parser.rb', line 14 def exist? (regex =~ single_match) || (regex =~ plural_matches) end |