Method: Licensee::LicenseMeta.from_yaml

Defined in:
lib/licensee/license_meta.rb

.from_yaml(yaml) ⇒ Object

Create a new LicenseMeta from YAML

yaml - the raw YAML string

returns a LicenseMeta with defaults set



26
27
28
29
30
# File 'lib/licensee/license_meta.rb', line 26

def from_yaml(yaml)
  return from_hash({}) if yaml.nil? || yaml.to_s.empty?

  from_hash YAML.safe_load(yaml)
end