Module: Commandify::Command
- Extended by:
- Core
- Defined in:
- lib/commandify/command.rb
Class Method Summary
collapse
Methods included from Core
command, goto, server_pid
Class Method Details
.commands ⇒ Object
16
17
18
19
20
|
# File 'lib/commandify/command.rb', line 16
def commands
methods.select { |v| v =~ /^run_/ }.collect do |command|
command.to_s.gsub 'run_', ''
end
end
|
.run(command) ⇒ Object
12
13
14
|
# File 'lib/commandify/command.rb', line 12
def run command
send "run_#{command}"
end
|
.run_a ⇒ Object
44
45
46
|
# File 'lib/commandify/command.rb', line 44
def run_a
goto Commandify::Directories::ASSETS
end
|
.run_c ⇒ Object
40
41
42
|
# File 'lib/commandify/command.rb', line 40
def run_c
goto Commandify::Directories::CONTROLLERS
end
|
.run_conf ⇒ Object
68
69
70
|
# File 'lib/commandify/command.rb', line 68
def run_conf
goto Commandify::Directories::CONFIG
end
|
.run_db ⇒ Object
80
81
82
|
# File 'lib/commandify/command.rb', line 80
def run_db
goto Commandify::Directories::DB
end
|
.run_e ⇒ Object
72
73
74
|
# File 'lib/commandify/command.rb', line 72
def run_e
goto Commandify::Directories::ENVIRONMENTS
end
|
.run_f ⇒ Object
64
65
66
|
# File 'lib/commandify/command.rb', line 64
def run_f
goto Commandify::Directories::FONTS
end
|
.run_h ⇒ Object
48
49
50
|
# File 'lib/commandify/command.rb', line 48
def run_h
goto Commandify::Directories::HELPERS
end
|
.run_i ⇒ Object
60
61
62
|
# File 'lib/commandify/command.rb', line 60
def run_i
goto Commandify::Directories::IMAGES
end
|
.run_init ⇒ Object
76
77
78
|
# File 'lib/commandify/command.rb', line 76
def run_init
goto Commandify::Directories::INITIALIZERS
end
|
.run_j ⇒ Object
52
53
54
|
# File 'lib/commandify/command.rb', line 52
def run_j
goto Commandify::Directories::JAVASCRIPTS
end
|
.run_l ⇒ Object
84
85
86
|
# File 'lib/commandify/command.rb', line 84
def run_l
goto Commandify::Directories::LIB
end
|
.run_la ⇒ Object
88
89
90
|
# File 'lib/commandify/command.rb', line 88
def run_la
goto Commandify::Directories::LIB_ASSETS
end
|
.run_laj ⇒ Object
100
101
102
|
# File 'lib/commandify/command.rb', line 100
def run_laj
goto Commandify::Directories::LIB_ASSETS_JAVASCRIPTS
end
|
.run_las ⇒ Object
96
97
98
|
# File 'lib/commandify/command.rb', line 96
def run_las
goto Commandify::Directories::LIB_ASSETS_STYLESHEETS
end
|
.run_lt ⇒ Object
92
93
94
|
# File 'lib/commandify/command.rb', line 92
def run_lt
goto Commandify::Directories::LIB_TASKS
end
|
.run_m ⇒ Object
32
33
34
|
# File 'lib/commandify/command.rb', line 32
def run_m
goto Commandify::Directories::MODELS
end
|
.run_p ⇒ Object
28
29
30
|
# File 'lib/commandify/command.rb', line 28
def run_p
goto Commandify::Directories::PUBLIC
end
|
.run_r ⇒ Object
24
25
26
|
# File 'lib/commandify/command.rb', line 24
def run_r
goto Commandify::Directories::ROOT
end
|
.run_s ⇒ Object
56
57
58
|
# File 'lib/commandify/command.rb', line 56
def run_s
goto Commandify::Directories::STYLESHEETS
end
|
.run_srvrestart(port = 3000) ⇒ Object
131
132
133
134
|
# File 'lib/commandify/command.rb', line 131
def run_srvrestart port=3000
run_srvstop port
run_srvstart port
end
|
.run_srvstart(port = 3000) ⇒ Object
126
127
128
129
|
# File 'lib/commandify/command.rb', line 126
def run_srvstart port=3000
run_srvstop port
system "rails server"
end
|
.run_srvstop(port = 3000) ⇒ Object
122
123
124
|
# File 'lib/commandify/command.rb', line 122
def run_srvstop port=3000
system "sudo kill -9 #{server_pid(port)}"
end
|
.run_v ⇒ Object
36
37
38
|
# File 'lib/commandify/command.rb', line 36
def run_v
goto Commandify::Directories::VIEWS
end
|
.run_va ⇒ Object
108
109
110
|
# File 'lib/commandify/command.rb', line 108
def run_va
goto Commandify::Directories::VENDOR_ASSETS
end
|
.run_vaj ⇒ Object
116
117
118
|
# File 'lib/commandify/command.rb', line 116
def run_vaj
goto Commandify::Directories::VENDOR_ASSETS_JAVASCRIPTS
end
|
.run_vas ⇒ Object
112
113
114
|
# File 'lib/commandify/command.rb', line 112
def run_vas
goto Commandify::Directories::VENDOR_ASSETS_STYLESHEETS
end
|