Sha256: 4f69597d2e76db1fe9b43fc7eb838a863a180d1e476ed2a17750197fa4297ce8

Contents?: true

Size: 393 Bytes

Versions: 20

Compression:

Stored size: 393 Bytes

Contents

module Relish
  module Command
    module ParamMethods
      
      def extract_option
        include?(':') ? split(':')[1] : self
      end

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

      def has_option?
        include?(':')
      end
      
      def extract_project_handle
        self && (has_option? ? true : nil) && without_option
      end
      
    end
  end
end   

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
relish-0.7.1 lib/relish/param_methods.rb
relish-0.7 lib/relish/param_methods.rb
relish-0.6 lib/relish/param_methods.rb
relish-0.5.3 lib/relish/param_methods.rb
relish-0.5.2 lib/relish/param_methods.rb
relish-0.5.1 lib/relish/param_methods.rb
relish-0.5.0 lib/relish/param_methods.rb
relish-0.4.0 lib/relish/param_methods.rb
relish-0.3.0 lib/relish/param_methods.rb
relish-0.3.0.pre lib/relish/param_methods.rb
relish-0.2.3 lib/relish/param_methods.rb
relish-0.2.2 lib/relish/param_methods.rb
relish-0.2.1 lib/relish/param_methods.rb
relish-0.2.0 lib/relish/param_methods.rb
relish-0.1.6 lib/relish/param_methods.rb
relish-0.1.5 lib/relish/param_methods.rb
relish-0.1.4 lib/relish/param_methods.rb
relish-0.1.3 lib/relish/param_methods.rb
relish-0.1.2 lib/relish/commands/param_methods.rb
relish-0.1.1 lib/relish/commands/param_methods.rb