Module: DNS::Zonefile::ZonefileGrammar::TimeMultiplier0

Defined in:
lib/dns/zonefile/parser.rb

Instance Method Summary collapse

Instance Method Details

#to_iObject



2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
# File 'lib/dns/zonefile/parser.rb', line 2662

def to_i
  case text_value.downcase
    when 'm' then 60
    when 'h' then 60 * 60
    when 'd' then 60 * 60 * 24
    when 'w' then 60 * 60 * 24 * 7
    else
      1
  end
end

#to_sObject



2659
2660
2661
# File 'lib/dns/zonefile/parser.rb', line 2659

def to_s
  text_value
end