Sha256: c72b37a942f2b4794da12943118609bf308d657248dcfda35c40fbc5283ce153

Contents?: true

Size: 558 Bytes

Versions: 19

Compression:

Stored size: 558 Bytes

Contents

module Restly::Base::GenericMethods

  def authorize(token_object)
    Restly::Proxies::Authorization.new self, token_object
  end

  def with_params(params={})
    Restly::Proxies::WithParams.new self, params
  end

  def with_path(*args)
    Restly::Proxies::WithPath.new self, *args
  end

  def path_with_format(*args)
    path = [self.path, args].flatten.compact.join('/')
    [path, format].compact.join('.') if path
  end

  def format
    client.format
  end

  def authorized?
    connection.token.present?
  end

  def proxied?
    false
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
restly-0.0.1.beta.10 lib/restly/base/generic_methods.rb
restly-0.0.1.beta.9 lib/restly/base/generic_methods.rb
restly-0.0.1.beta.6 lib/restly/base/generic_methods.rb
restly-0.0.1.beta.5 lib/restly/base/generic_methods.rb
restly-0.0.1.beta.4 lib/restly/base/generic_methods.rb
restly-0.0.1.beta.3 lib/restly/base/generic_methods.rb
restly-0.0.1.beta.2 lib/restly/base/generic_methods.rb
restly-0.0.1.beta.1 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.22 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.19 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.18 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.16 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.12 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.11 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.10 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.9 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.8 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.7 lib/restly/base/generic_methods.rb
restly-0.0.1.alpha.6 lib/restly/base/generic_methods.rb