Class: GeezifyRb::Geezify
- Inherits:
-
Object
- Object
- GeezifyRb::Geezify
- Defined in:
- lib/geezify-rb/geezify.rb
Overview
This class contains the processing tools to convert arabic numbers to Geeze.
Constant Summary collapse
- ERROR_MSG_CONSTRUCTOR =
'invalid input the input is not a number'- ERROR_MSG1 =
'invalid input to method geezify_2digit'- ERROR_MSG2 =
'invalid input to geezify_4digit'
Class Method Summary collapse
Instance Method Summary collapse
- #geezify ⇒ Object
-
#initialize(num) ⇒ Geezify
constructor
A new instance of Geezify.
Constructor Details
#initialize(num) ⇒ Geezify
Returns a new instance of Geezify.
12 13 14 15 16 |
# File 'lib/geezify-rb/geezify.rb', line 12 def initialize(num) raise ArgumentError, ERROR_MSG_CONSTRUCTOR unless num.integer? @num = num end |
Class Method Details
.geezify(num) ⇒ Object
18 19 20 |
# File 'lib/geezify-rb/geezify.rb', line 18 def self.geezify(num) new(num).geezify end |
Instance Method Details
#geezify ⇒ Object
22 23 24 |
# File 'lib/geezify-rb/geezify.rb', line 22 def geezify clean_up_uncessary_1s geezify_with_1s(@num) end |