Class: CBETA::CharCount

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

Instance Method Summary collapse

Constructor Details

#initialize(xml_root) ⇒ CharCount

Returns a new instance of CharCount.



2
3
4
5
# File 'lib/cbeta/char_count.rb', line 2

def initialize(xml_root)
  @xml_root = xml_root
  @result = {}
end

Instance Method Details

#char_count(canon = nil) ⇒ Object



7
8
9
10
11
# File 'lib/cbeta/char_count.rb', line 7

def char_count(canon=nil)
  stat_all if canon.nil?
  stat_canon(canon)
  @result
end