Class: Stash::Wrapper::License

Inherits:
Object
  • Object
show all
Includes:
XML::Mapping
Defined in:
lib/stash/wrapper/license.rb,
lib/stash/wrapper/license.rb

Overview

Mapping class for <st:license>

Constant Summary collapse

CC_BY =

Convenience instance for the CC-BY license

License.new(
  name: 'Creative Commons Attribution 4.0 International (CC-BY)',
  uri: URI('https://creativecommons.org/licenses/by/4.0/legalcode')
)

Instance Method Summary collapse

Constructor Details

#initialize(name:, uri:) ⇒ License

Creates a new Stash::Wrapper::License object

Parameters:

  • name (String) —

    The license name

  • uri (URI) —

    The license URI



16
17
18
19
# File 'lib/stash/wrapper/license.rb', line 16

def initialize(name:, uri:)
  self.name = name
  self.uri = uri
end