Class: Wpgen::CommandLineInterface
- Inherits:
-
Object
- Object
- Wpgen::CommandLineInterface
show all
- Defined in:
- lib/wpgen/command_line_interface.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of CommandLineInterface.
3
4
5
|
# File 'lib/wpgen/command_line_interface.rb', line 3
def initialize
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
31
32
33
|
# File 'lib/wpgen/command_line_interface.rb', line 31
def method_missing(m, *args, &block)
help
end
|
Instance Method Details
#css ⇒ Object
23
24
25
|
# File 'lib/wpgen/command_line_interface.rb', line 23
def css
FileWriter.write_css ARGV[1]
end
|
#help ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/wpgen/command_line_interface.rb', line 35
def help
puts "WPGEN"
puts "Version: #{Wpgen::VERSION}"
puts "Author: Travis Luong"
puts ""
puts "Available commands:"
puts "wpgen new my_theme"
puts "wpgen post my_post"
puts "wpgen page my_page"
puts "wpgen sidebar my_sidebar"
puts "wpgen css file_name"
puts "wpgen stylesheet"
end
|
#new ⇒ Object
7
8
9
|
# File 'lib/wpgen/command_line_interface.rb', line 7
def new
FileWriter.new_theme ARGV[1]
end
|
19
20
21
|
# File 'lib/wpgen/command_line_interface.rb', line 19
def
FileWriter. ARGV[1]
end
|