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.



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

def out_path
  @out_path
end

#scriptObject (readonly)

Returns the value of attribute script.



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

def script
  @script
end

#script_pathObject (readonly)

Returns the value of attribute script_path.



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

def script_path
  @script_path
end

#use_namesObject (readonly)

Returns the value of attribute use_names.



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

def use_names
  @use_names
end

Instance Method Details

#runObject



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

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

  generate
  return unless args['--watch']

  watch_and_generate
end