class Ghundle::Metadata

Attributes

description[R]
types[R]
version[R]

Public Class Methods

from_yaml(filename) click to toggle source
# File lib/ghundle/metadata.rb, line 7
def self.from_yaml(filename)
  new(YAML.load_file(filename))
end
new(data = {}) click to toggle source
# File lib/ghundle/metadata.rb, line 11
def initialize(data = {})
  @version     = HookVersion.new(data['version'])
  @types       = data['types']
  @description = data['description']
end

Public Instance Methods

to_h() click to toggle source
# File lib/ghundle/metadata.rb, line 17
def to_h
  {
    'types'       => types,
    'version'     => version.to_s,
    'description' => description,
  }
end