Sha256: 71187da45b5f2294ee2c605999ac80cff1ebfe48e5514dcb455c3fc96226ed54

Contents?: true

Size: 455 Bytes

Versions: 2

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

require 'cloudflair/api/zone/railgun'

module Cloudflair
  class Zone
    def railguns(filter = {})
      raw_railguns = response connection.get("#{path}/railguns", filter)

      raw_railguns.map do |raw_railgun|
        railgun = railgun raw_railgun['id']
        railgun.data = raw_railgun
        railgun
      end
    end

    def railgun(railgun_id)
      Cloudflair::Railgun.new zone_id, railgun_id
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cloudflair-0.4.0 lib/cloudflair/api/zone__railguns.rb
cloudflair-0.3.0 lib/cloudflair/api/zone__railguns.rb