Class: Daijisen::Definition
- Inherits:
-
Object
- Object
- Daijisen::Definition
- Defined in:
- lib/daijisen.rb
Overview
For delicious Ruby Modularity, Definitions will be OOPified.
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.
46 47 48 49 50 |
# File 'lib/daijisen.rb', line 46 def initialize(def_html) @link = def_html.css("a")[0]['href'] @reading = def_html.css("a")[0].content @example = "" end |
Instance Attribute Details
#example ⇒ Object
Returns the value of attribute example.
44 45 46 |
# File 'lib/daijisen.rb', line 44 def example @example end |
#link ⇒ Object
Returns the value of attribute link.
44 45 46 |
# File 'lib/daijisen.rb', line 44 def link @link end |
#reading ⇒ Object
Returns the value of attribute reading.
44 45 46 |
# File 'lib/daijisen.rb', line 44 def reading @reading end |