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

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

Instance Method Summary collapse

Instance Method Details

#to_iObject



3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
# File 'lib/dns/zonefile/parser.rb', line 3412

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



3409
3410
3411
# File 'lib/dns/zonefile/parser.rb', line 3409

def to_s
  text_value
end