Sha256: 4545a7e462258cfda44960056d3a434699ea958a74ec254c67a5c0200e642b8a
Contents?: true
Size: 891 Bytes
Versions: 8
Compression:
Stored size: 891 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(i12n) from_asserted_hash(Types::TypeAsserter.assert_instance_of('RubyMethod initializer', _pcore_type.i12n_type, i12n)) 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
8 entries across 8 versions & 1 rubygems