Class: JEDICT::Parser::Count

Inherits:
Nokogiri::XML::SAX::Document
  • Object
show all
Defined in:
lib/jedict.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCount

Returns a new instance of Count.



199
200
201
# File 'lib/jedict.rb', line 199

def initialize 
  @value = 0
end

Instance Attribute Details

#valueObject

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