Class: Colorly::Command

Inherits:
MisterBin::Command
  • Object
show all
Includes:
Colsole
Defined in:
lib/colorly/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#out_pathObject (readonly)

Returns the value of attribute out_path.



38
39
40
# File 'lib/colorly/command.rb', line 38

def out_path
  @out_path
end

#scriptObject (readonly)

Returns the value of attribute script.



38
39
40
# File 'lib/colorly/command.rb', line 38

def script
  @script
end

#script_pathObject (readonly)

Returns the value of attribute script_path.



38
39
40
# File 'lib/colorly/command.rb', line 38

def script_path
  @script_path
end

#use_namesObject (readonly)

Returns the value of attribute use_names.



38
39
40
# File 'lib/colorly/command.rb', line 38

def use_names
  @use_names
end

Instance Method Details

#runObject



40
41
42
43
44
45
46
47
48
49
# File 'lib/colorly/command.rb', line 40

def run
  @script_path = args['SCRIPT']
  @out_path = args['OUTPUT_PATH']
  @use_names = args['--names']

  generate
  return unless args['--watch']

  watch_and_generate
end