Class: Daijisen::Query
- Inherits:
-
Object
- Object
- Daijisen::Query
- Defined in:
- lib/daijisen.rb
Overview
Query Object. Effectively scrapes The Yahoo Daijisen Dictionary And finds definitions of the Japanese String passed in
TODO: Incorporate SHIFT_JS encoding. Only UTF-8 works for now.
Instance Attribute Summary collapse
-
#defs ⇒ Object
Returns the value of attribute defs.
-
#query ⇒ Object
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(query) ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize(query) ⇒ Query
Returns a new instance of Query.
24 25 26 27 28 |
# File 'lib/daijisen.rb', line 24 def initialize(query) @query = query @defs = [] get_raw_html() end |
Instance Attribute Details
#defs ⇒ Object
Returns the value of attribute defs.
22 23 24 |
# File 'lib/daijisen.rb', line 22 def defs @defs end |
#query ⇒ Object
Returns the value of attribute query.
22 23 24 |
# File 'lib/daijisen.rb', line 22 def query @query end |