Class: EnigmaEncrypto::DateOffsetGen

Inherits:
Object
  • Object
show all
Defined in:
lib/enigma_encrypto/dateoffset_gen.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDateOffsetGen

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_dateObject

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_offsetObject



11
12
13
# File 'lib/enigma_encrypto/dateoffset_gen.rb', line 11

def get_offset
  date_squared_last_four
end