Sha256: d08d08c78584e990c447697697ed974ffce4e4357e94eeb479b0a5f7a1962c34

Contents?: true

Size: 906 Bytes

Versions: 507

Compression:

Stored size: 906 Bytes

Contents

module Puppet::Pops
module Types
  class RubyMethod < Annotation
    # Register the Annotation type. This is the type that all custom Annotations will inherit from.
    def self.register_ptype(loader, ir)
      @type = Pcore::create_object_type(loader, ir, self, 'RubyMethod', 'Annotation',
        'body' => PStringType::DEFAULT,
        'parameters' => {
          KEY_TYPE => POptionalType.new(PStringType::NON_EMPTY),
          KEY_VALUE => nil
        }
      )
    end

    def self.from_hash(init_hash)
      from_asserted_hash(Types::TypeAsserter.assert_instance_of('RubyMethod initializer', _pcore_type.init_hash_type, init_hash))
    end

    def self.from_asserted_hash(init_hash)
      new(init_hash['body'], init_hash['parameters'])
    end

    attr_reader :body, :parameters

    def initialize(body, parameters = nil)
      @body = body
      @parameters = parameters
    end
  end
end
end

Version data entries

507 entries across 507 versions & 2 rubygems

Version Path
puppet-7.34.0 lib/puppet/pops/types/ruby_method.rb
puppet-7.34.0-x86-mingw32 lib/puppet/pops/types/ruby_method.rb
puppet-7.34.0-x64-mingw32 lib/puppet/pops/types/ruby_method.rb
puppet-7.34.0-universal-darwin lib/puppet/pops/types/ruby_method.rb
puppet-7.33.0 lib/puppet/pops/types/ruby_method.rb
puppet-7.33.0-x86-mingw32 lib/puppet/pops/types/ruby_method.rb
puppet-7.33.0-x64-mingw32 lib/puppet/pops/types/ruby_method.rb
puppet-7.33.0-universal-darwin lib/puppet/pops/types/ruby_method.rb
puppet-7.32.1 lib/puppet/pops/types/ruby_method.rb
puppet-7.32.1-x86-mingw32 lib/puppet/pops/types/ruby_method.rb
puppet-7.32.1-x64-mingw32 lib/puppet/pops/types/ruby_method.rb
puppet-7.32.1-universal-darwin lib/puppet/pops/types/ruby_method.rb
puppet-7.31.0 lib/puppet/pops/types/ruby_method.rb
puppet-7.31.0-x86-mingw32 lib/puppet/pops/types/ruby_method.rb
puppet-7.31.0-x64-mingw32 lib/puppet/pops/types/ruby_method.rb
puppet-7.31.0-universal-darwin lib/puppet/pops/types/ruby_method.rb
puppet-7.30.0 lib/puppet/pops/types/ruby_method.rb
puppet-7.30.0-x86-mingw32 lib/puppet/pops/types/ruby_method.rb
puppet-7.30.0-x64-mingw32 lib/puppet/pops/types/ruby_method.rb
puppet-7.30.0-universal-darwin lib/puppet/pops/types/ruby_method.rb