class Puppet::Pops::Types::RubyMethod
Attributes
body[R]
parameters[R]
Public Class Methods
from_asserted_hash(init_hash)
click to toggle source
# File lib/puppet/pops/types/ruby_method.rb 20 def self.from_asserted_hash(init_hash) 21 new(init_hash['body'], init_hash['parameters']) 22 end
from_hash(init_hash)
click to toggle source
# File lib/puppet/pops/types/ruby_method.rb 16 def self.from_hash(init_hash) 17 from_asserted_hash(Types::TypeAsserter.assert_instance_of('RubyMethod initializer', _pcore_type.init_hash_type, init_hash)) 18 end
new(body, parameters = nil)
click to toggle source
# File lib/puppet/pops/types/ruby_method.rb 26 def initialize(body, parameters = nil) 27 @body = body 28 @parameters = parameters 29 end
register_ptype(loader, ir)
click to toggle source
Register the Annotation type. This is the type that all custom Annotations will inherit from.
# File lib/puppet/pops/types/ruby_method.rb 6 def self.register_ptype(loader, ir) 7 @type = Pcore::create_object_type(loader, ir, self, 'RubyMethod', 'Annotation', 8 'body' => PStringType::DEFAULT, 9 'parameters' => { 10 KEY_TYPE => POptionalType.new(PStringType::NON_EMPTY), 11 KEY_VALUE => nil 12 } 13 ) 14 end