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

.commandsObject



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_aObject



44
45
46
# File 'lib/commandify/command.rb', line 44

def run_a
  goto Commandify::Directories::ASSETS
end

.run_cObject



40
41
42
# File 'lib/commandify/command.rb', line 40

def run_c
  goto Commandify::Directories::CONTROLLERS
end

.run_confObject



68
69
70
# File 'lib/commandify/command.rb', line 68

def run_conf
  goto Commandify::Directories::CONFIG
end

.run_dbObject



80
81
82
# File 'lib/commandify/command.rb', line 80

def run_db
  goto Commandify::Directories::DB
end

.run_eObject



72
73
74
# File 'lib/commandify/command.rb', line 72

def run_e
  goto Commandify::Directories::ENVIRONMENTS
end

.run_fObject



64
65
66
# File 'lib/commandify/command.rb', line 64

def run_f
  goto Commandify::Directories::FONTS
end

.run_hObject



48
49
50
# File 'lib/commandify/command.rb', line 48

def run_h
  goto Commandify::Directories::HELPERS
end

.run_iObject



60
61
62
# File 'lib/commandify/command.rb', line 60

def run_i
  goto Commandify::Directories::IMAGES
end

.run_initObject



76
77
78
# File 'lib/commandify/command.rb', line 76

def run_init
  goto Commandify::Directories::INITIALIZERS
end

.run_jObject



52
53
54
# File 'lib/commandify/command.rb', line 52

def run_j
  goto Commandify::Directories::JAVASCRIPTS
end

.run_lObject



84
85
86
# File 'lib/commandify/command.rb', line 84

def run_l
  goto Commandify::Directories::LIB
end

.run_laObject



88
89
90
# File 'lib/commandify/command.rb', line 88

def run_la
  goto Commandify::Directories::LIB_ASSETS
end

.run_lajObject



100
101
102
# File 'lib/commandify/command.rb', line 100

def run_laj
  goto Commandify::Directories::LIB_ASSETS_JAVASCRIPTS
end

.run_lasObject



96
97
98
# File 'lib/commandify/command.rb', line 96

def run_las
  goto Commandify::Directories::LIB_ASSETS_STYLESHEETS
end

.run_ltObject



92
93
94
# File 'lib/commandify/command.rb', line 92

def run_lt
  goto Commandify::Directories::LIB_TASKS
end

.run_mObject



32
33
34
# File 'lib/commandify/command.rb', line 32

def run_m
  goto Commandify::Directories::MODELS
end

.run_pObject



28
29
30
# File 'lib/commandify/command.rb', line 28

def run_p
  goto Commandify::Directories::PUBLIC
end

.run_rObject

Navigation



24
25
26
# File 'lib/commandify/command.rb', line 24

def run_r
  goto Commandify::Directories::ROOT
end

.run_sObject



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

Processes



122
123
124
# File 'lib/commandify/command.rb', line 122

def run_srvstop port=3000
  system "sudo kill -9 #{server_pid(port)}"
end

.run_vObject



36
37
38
# File 'lib/commandify/command.rb', line 36

def run_v
  goto Commandify::Directories::VIEWS
end

.run_vaObject



108
109
110
# File 'lib/commandify/command.rb', line 108

def run_va
  goto Commandify::Directories::VENDOR_ASSETS
end

.run_vajObject



116
117
118
# File 'lib/commandify/command.rb', line 116

def run_vaj
  goto Commandify::Directories::VENDOR_ASSETS_JAVASCRIPTS
end

.run_vasObject



112
113
114
# File 'lib/commandify/command.rb', line 112

def run_vas
  goto Commandify::Directories::VENDOR_ASSETS_STYLESHEETS
end