Sha256: c9d86163eb02811099eb0aa93ad784948ae78f382ff688572ee300c55759d91a

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

require 'cloudflair/api/zone/settings'
require 'cloudflair/communication'

module Cloudflair
  def self.zone(zone_id)
    Zone.new zone_id
  end

  class Zone
    include Cloudflair::Communication

    attr_reader :zone_id

    patchable_fields :paused, :vanity_name_servers, :plan

    def initialize(zone_id)
      @zone_id = zone_id
    end

    def settings
      @settings ||= Cloudflair::Settings.new zone_id
    end

    private

    def path
      "/zones/#{zone_id}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cloudflair-0.0.2 lib/cloudflair/api/zone.rb
cloudflair-0.0.1 lib/cloudflair/api/zone.rb