Class: JEDICT::Parser::Count
- Inherits:
-
Nokogiri::XML::SAX::Document
- Object
- Nokogiri::XML::SAX::Document
- JEDICT::Parser::Count
- Defined in:
- lib/jedict.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize ⇒ Count
constructor
A new instance of Count.
- #start_element(name, attrs) ⇒ Object
Constructor Details
#initialize ⇒ Count
Returns a new instance of Count.
199 200 201 |
# File 'lib/jedict.rb', line 199 def initialize @value = 0 end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
197 198 199 |
# File 'lib/jedict.rb', line 197 def value @value end |
Instance Method Details
#start_element(name, attrs) ⇒ Object
203 204 205 |
# File 'lib/jedict.rb', line 203 def start_element(name, attrs) @value += 1 if name == "entry" end |