class Crntb::Line

Public Class Methods

new(line) click to toggle source
# File lib/crntb/line.rb, line 6
def initialize(line)
  return if line.empty?
  @entry = ::Crontab::Entry.parse(line)
end

Public Instance Methods

to_chef() click to toggle source
# File lib/crntb/line.rb, line 19
def to_chef
  Crntb::Outputer::ChefCron.build(@entry)
end
to_h() click to toggle source
# File lib/crntb/line.rb, line 11
def to_h
  Crntb::Outputer::Hash.build(@entry)
end
to_json() click to toggle source
# File lib/crntb/line.rb, line 15
def to_json
  to_h.to_json
end
to_whenever() click to toggle source
# File lib/crntb/line.rb, line 23
def to_whenever
  Crntb::Outputer::Whenever.build(@entry)
end