class Gurney::Config

Attributes

api_token[RW]
api_url[RW]
branches[RW]
project_id[RW]

Public Class Methods

from_yaml(yaml) click to toggle source
# File lib/gurney/config.rb, line 15
def self.from_yaml(yaml)
    config = YAML.load(yaml)&.map{|(k,v)| [k.to_sym,v]}.to_h
    new(**config)
end
new(branches: nil, api_url: nil, api_token: nil, project_id: nil) click to toggle source
# File lib/gurney/config.rb, line 8
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