Sha256: 4f0e62ceea0a103afe3fee04b8965a39e2046adcf671bfd92db9b0205a355d1c
Contents?: true
Size: 781 Bytes
Versions: 7
Compression:
Stored size: 781 Bytes
Contents
require 'contracts' module GitHubStatus module Support module Params include ::Contracts::Core include ::Contracts::Builtin Contract None => String def path @path ||= params.fetch 'path' rescue KeyError STDERR.puts 'Params is missing path' abort end Contract None => Enum['success', 'pending', 'failure'] def state @state ||= params.fetch 'state' rescue KeyError STDERR.puts 'Params is missing state' abort end Contract None => String def context @context ||= params.fetch 'context', 'concourse' end Contract None => String def description @description ||= params.fetch 'description', '' end end end end
Version data entries
7 entries across 7 versions & 1 rubygems