Class: ParamsDebugger::Parser
- Inherits:
-
Object
- Object
- ParamsDebugger::Parser
- Defined in:
- lib/params_debugger/parser.rb
Constant Summary collapse
- DEFAULT_LOG =
:development
Class Method Summary collapse
Class Method Details
.parse_actions(args) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/params_debugger/parser.rb', line 15 def self.parse_actions args actions = [] args.each do |arg| actions << arg unless arg.match /^-/ end actions end |
.parse_log(options) ⇒ Object
25 26 27 28 29 |
# File 'lib/params_debugger/parser.rb', line 25 def self.parse_log log = DEFAULT_LOG "log/#{log}.log" end |
.parse_options(args) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/params_debugger/parser.rb', line 5 def self. args = [] args.each do |arg| << arg.delete('-') if arg.match /^-/ end end |