Class: Mycommands::ApplicationView

Inherits:
View
  • Object
show all
Defined in:
lib/mycommands/views/application_view.rb

Instance Method Summary collapse

Methods inherited from View

#add_default_routes, #header, #initialize, #print

Constructor Details

This class inherits a constructor from Mycommands::View

Instance Method Details

#copy_yaml_filesObject



3
4
5
6
7
8
9
10
# File 'lib/mycommands/views/application_view.rb', line 3

def copy_yaml_files
  for file in @copied
    print "#{file} has been copied to #{@path}."
  end
  for file in @skipped
    print "#{file} was skipped as it already exist."
  end
end

#helpObject



17
18
19
20
21
# File 'lib/mycommands/views/application_view.rb', line 17

def help
  for option in @options
    print "-#{option[:short]}, --#{option[:verbose]} \t\t #{option[:description]}"
  end
end

#sort_yaml_filesObject



12
13
14
15
# File 'lib/mycommands/views/application_view.rb', line 12

def sort_yaml_files
  print "#{@category_file} has been sorted."
  print "#{@command_file} has been sorted."
end