Sha256: af26afc04fb89e2ffd03c8d1da15207830809eca2aac1e2439f90a9be94929b4

Contents?: true

Size: 516 Bytes

Versions: 17

Compression:

Stored size: 516 Bytes

Contents

module Relish
  module ResourceMethods
    def self.included(command_class)
      command_class.extend ClassMethods
    end
    
    module ClassMethods
      def resource_path(path)
        define_method :resource_path do |project|
          "projects/#{escape(project)}/#{path}"
        end
      end
    end
    
    def resource_path_for_no_option
      resource_path(@param || project)
    end
    
    def resource_path_for_option
      resource_path(@param.extract_project_handle || project)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

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