Class: Daijisen::Definition

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

Overview

For delicious Ruby Modularity, Definitions will be OOPified.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#exampleObject

Returns the value of attribute example.



44
45
46
# File 'lib/daijisen.rb', line 44

def example
  @example
end

Returns the value of attribute link.



44
45
46
# File 'lib/daijisen.rb', line 44

def link
  @link
end

#readingObject

Returns the value of attribute reading.



44
45
46
# File 'lib/daijisen.rb', line 44

def reading
  @reading
end