Module: Relish::Command::ParamMethods
- Defined in:
- lib/relish/param_methods.rb
Instance Method Summary collapse
- #extract_option ⇒ Object
- #extract_project_handle ⇒ Object
- #has_option? ⇒ Boolean
- #without_option ⇒ Object
Instance Method Details
#extract_option ⇒ Object
5 6 7 |
# File 'lib/relish/param_methods.rb', line 5 def extract_option include?(':') ? split(':')[1] : self end |
#extract_project_handle ⇒ Object
17 18 19 |
# File 'lib/relish/param_methods.rb', line 17 def extract_project_handle self && (has_option? ? true : nil) && without_option end |
#has_option? ⇒ Boolean
13 14 15 |
# File 'lib/relish/param_methods.rb', line 13 def has_option? include?(':') end |
#without_option ⇒ Object
9 10 11 |
# File 'lib/relish/param_methods.rb', line 9 def without_option split(':')[0] end |