Module: Cronscription

Defined in:
lib/cronscription.rb,
lib/cronscription/tab.rb,
lib/cronscription/entry.rb,
lib/cronscription/version.rb

Defined Under Namespace

Classes: Entry, Tab

Constant Summary collapse

VERSION =
'1.0.0'

Class Method Summary collapse

Class Method Details

.from_filepath(path) ⇒ Object



12
13
14
15
16
# File 'lib/cronscription.rb', line 12

def from_filepath(path)
  File.open(path) do |f|
    Tab.new(f.readlines)
  end
end

.from_s(str) ⇒ Object

Convenient construction methods



8
9
10
# File 'lib/cronscription.rb', line 8

def from_s(str)
  Tab.new(str.lines.to_a)
end