Class: Daijisen::Definition
- Inherits:
-
Object
- Object
- Daijisen::Definition
- Defined in:
- lib/daijisen.rb
Instance Attribute Summary collapse
-
#example ⇒ Object
Returns the value of attribute example.
-
#link ⇒ Object
Returns the value of attribute link.
-
#reading ⇒ Object
Returns the value of attribute reading.
Instance Method Summary collapse
-
#initialize(def_html) ⇒ Definition
constructor
A new instance of Definition.
Constructor Details
#initialize(def_html) ⇒ Definition
Returns a new instance of Definition.
42 43 44 45 46 |
# File 'lib/daijisen.rb', line 42 def initialize(def_html) @link = def_html.css("h3 a")[0]['href'] @reading = def_html.css("h3 a")[0].content @example = def_html.css("div")[0].content end |
Instance Attribute Details
#example ⇒ Object
Returns the value of attribute example.
40 41 42 |
# File 'lib/daijisen.rb', line 40 def example @example end |
#link ⇒ Object
Returns the value of attribute link.
40 41 42 |
# File 'lib/daijisen.rb', line 40 def link @link end |
#reading ⇒ Object
Returns the value of attribute reading.
40 41 42 |
# File 'lib/daijisen.rb', line 40 def reading @reading end |