Class: EnigmaEncrypto::DateOffsetGen
- Inherits:
-
Object
- Object
- EnigmaEncrypto::DateOffsetGen
- Defined in:
- lib/enigma_encrypto/dateoffset_gen.rb
Instance Attribute Summary collapse
-
#todays_date ⇒ Object
Returns the value of attribute todays_date.
Instance Method Summary collapse
- #get_decrypter_offset(date) ⇒ Object
- #get_offset ⇒ Object
-
#initialize ⇒ DateOffsetGen
constructor
A new instance of DateOffsetGen.
Constructor Details
#initialize ⇒ DateOffsetGen
Returns a new instance of DateOffsetGen.
7 8 9 |
# File 'lib/enigma_encrypto/dateoffset_gen.rb', line 7 def initialize @todays_date = Time.now.strftime("%02d%02m%02y") end |
Instance Attribute Details
#todays_date ⇒ Object
Returns the value of attribute todays_date.
5 6 7 |
# File 'lib/enigma_encrypto/dateoffset_gen.rb', line 5 def todays_date @todays_date end |
Instance Method Details
#get_decrypter_offset(date) ⇒ Object
15 16 17 18 |
# File 'lib/enigma_encrypto/dateoffset_gen.rb', line 15 def get_decrypter_offset(date) @todays_date = date date_squared_last_four end |
#get_offset ⇒ Object
11 12 13 |
# File 'lib/enigma_encrypto/dateoffset_gen.rb', line 11 def get_offset date_squared_last_four end |