Class: CBETA::CharCount
- Inherits:
-
Object
- Object
- CBETA::CharCount
- Defined in:
- lib/cbeta/char_count.rb
Instance Method Summary collapse
- #char_count(canon = nil) ⇒ Object
-
#initialize(xml_root) ⇒ CharCount
constructor
A new instance of CharCount.
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 |