Method: Puppet::Interface#initialize
- Defined in:
- lib/vendor/puppet/interface.rb
#initialize(name, version, &block) ⇒ Interface
Returns a new instance of Interface.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/vendor/puppet/interface.rb', line 91 def initialize(name, version, &block) unless SemVer.valid?(version) raise ArgumentError, "Cannot create face #{name.inspect} with invalid version number '#{version}'!" end @name = Puppet::Interface::FaceCollection.underscorize(name) @version = SemVer.new(version) # The few bits of documentation we actually demand. The default license # is a favour to our end users; if you happen to get that in a core face # report it as a bug, please. --daniel 2011-04-26 @authors = [] @license = 'All Rights Reserved' instance_eval(&block) if block_given? end |