Sha256: 83044eaa93366e81da9c8583f8559d0ffffdf4cc0a092b6585254693431e7707

Contents?: true

Size: 404 Bytes

Versions: 2

Compression:

Stored size: 404 Bytes

Contents

require 'json'

module ConfCtl
  class Swpins::DeployedInfo
    # @param json [String]
    def self.parse!(json)
      new(JSON.parse(json))
    rescue JSON::ParserError => e
      raise Error, "unable to parse swpins info: #{e.message}"
    end

    # @return [Hash]
    attr_reader :swpins

    def initialize(hash)
      @swpins = hash
    end

    def [](swpin)
      swpins[swpin]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
confctl-2.0.0 lib/confctl/swpins/deployed_info.rb
confctl-1.0.0 lib/confctl/swpins/deployed_info.rb