Sha256: d1e874b48a65885b8afada7127cb1348a296cb65e08a09e0bf049acb36939d9f

Contents?: true

Size: 468 Bytes

Versions: 7

Compression:

Stored size: 468 Bytes

Contents

class Newslettre::Client
  attr_reader :api
  def initialize email, password
    @api = Newslettre::API.new :email => email, :password => password
  end

  def newsletters
    @newsletters ||= proxy_for Newslettre::Letter
  end

  def identities
    @identities ||= proxy_for Newslettre::Identity
  end

  def lists
    @lists ||= proxy_for Newslettre::Lists
  end

  protected

  def proxy_for klass
    Newslettre::APIModuleProxy.new self, klass.new(@api)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
newslettre-0.2.4 lib/newslettre/client.rb
newslettre-0.2.3 lib/newslettre/client.rb
newslettre-0.2.2 lib/newslettre/client.rb
newslettre-0.2.1 lib/newslettre/client.rb
newslettre-0.2.0 lib/newslettre/client.rb
newslettre-0.1.1 lib/newslettre/client.rb
newslettre-0.1.0 lib/newslettre/client.rb