Class: Palette::Cli
- Inherits:
-
Object
- Object
- Palette::Cli
- Defined in:
- lib/palette/cli.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Cli
constructor
A new instance of Cli.
Constructor Details
#initialize(*args) ⇒ Cli
Returns a new instance of Cli.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/palette/cli.rb', line 3 def initialize(*args) if File.exist?(path = File.(args.first)) begin puts Palette::Dsl.run { eval(IO.read(path), binding, path) } rescue Exception => e puts "Please check the syntax of your palette file\n #{e}" exit 1 end end end |