Class: EasyEncoding::Base
- Inherits:
-
Object
- Object
- EasyEncoding::Base
- Defined in:
- lib/easy_encoding/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
- #char_codes ⇒ Object
- #frequencies ⇒ Object
-
#initialize(input) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(input) ⇒ Base
Returns a new instance of Base.
5 6 7 |
# File 'lib/easy_encoding/base.rb', line 5 def initialize(input) @input = input end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
3 4 5 |
# File 'lib/easy_encoding/base.rb', line 3 def input @input end |
Instance Method Details
#char_codes ⇒ Object
9 10 11 |
# File 'lib/easy_encoding/base.rb', line 9 def char_codes @char_codes ||= generate_codes! end |
#frequencies ⇒ Object
13 14 15 |
# File 'lib/easy_encoding/base.rb', line 13 def frequencies @frequencies ||= calculate_frequencies! end |