Module: Relish::Command::ParamMethods

Defined in:
lib/relish/param_methods.rb

Instance Method Summary collapse

Instance Method Details

#extract_optionObject



5
6
7
# File 'lib/relish/param_methods.rb', line 5

def extract_option
  include?(':') ? split(':')[1] : self
end

#extract_project_handleObject



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

Returns:

  • (Boolean)


13
14
15
# File 'lib/relish/param_methods.rb', line 13

def has_option?
  include?(':')
end

#without_optionObject



9
10
11
# File 'lib/relish/param_methods.rb', line 9

def without_option
  split(':')[0]
end