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 19 def self.from_asserted_hash(init_hash) 20 new(init_hash['body'], init_hash['parameters']) 21 end
from_hash(init_hash)
click to toggle source
# File lib/puppet/pops/types/ruby_method.rb 15 def self.from_hash(init_hash) 16 from_asserted_hash(Types::TypeAsserter.assert_instance_of('RubyMethod initializer', _pcore_type.init_hash_type, init_hash)) 17 end
new(body, parameters = nil)
click to toggle source
# File lib/puppet/pops/types/ruby_method.rb 25 def initialize(body, parameters = nil) 26 @body = body 27 @parameters = parameters 28 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 5 def self.register_ptype(loader, ir) 6 @type = Pcore::create_object_type(loader, ir, self, 'RubyMethod', 'Annotation', 7 'body' => PStringType::DEFAULT, 8 'parameters' => { 9 KEY_TYPE => POptionalType.new(PStringType::NON_EMPTY), 10 KEY_VALUE => nil 11 } 12 ) 13 end