Sha256: b68ac1f4428ab993b7964c32c98e59bf188e15331a8dfbf9e3a45fdf876af5b5
Contents?: true
Size: 459 Bytes
Versions: 12
Compression:
Stored size: 459 Bytes
Contents
require 'yaml' module Gurney class Config attr_accessor :branches, :api_url, :api_token, :project_id def initialize(branches: nil, api_url: nil, api_token: nil, project_id: nil) @branches = branches @api_url = api_url @api_token = api_token&.to_s @project_id = project_id&.to_s end def self.from_yaml(yaml) config = YAML.load(yaml)&.map{|(k,v)| [k.to_sym,v]}.to_h new(**config) end end end
Version data entries
12 entries across 12 versions & 1 rubygems