// NewGetPortableClassItems returns a NewMethod that writes a
// GetPortableClassItems method for the supplied Object to the supplied file.
NewGetPortableClassItems returns a NewMethod that writes a
GetPortableClassItems method for the supplied Object to the supplied file.
// NewGetPortableClassItems returns a NewMethod that writes a // GetPortableClassItems method for the supplied Object to the supplied file .
func NewGetPortableClassItems(receiver, resource string) New {
	return func(f *jen.File, o types.Object) {
		f.Commentf("GetPortableClassItems of this %s.", o.Name())
		f.Func().Params(jen.Id(receiver).Op("*").Id(o.Name())).Id("GetPortableClassItems").Params().Index().Qual(resource, "PortableClass").Block(
			jen.Id("items").Op(":=").Make(jen.Index().Qual(resource, "PortableClass"), jen.Len(jen.Id(receiver).Dot("Items"))),
			jen.For(jen.Id("i").Op(":=").Range().Id(receiver).Dot("Items")).Block(
				jen.Id("items").Index(jen.Id("i")).Op("=").Qual(resource, "PortableClass").Call(jen.Op("&").Id(receiver).Dot("Items").Index(jen.Id("i"))),
			),
			jen.Return(jen.Id("items")),
		)
	}
}
func NewGetPortableClassItems ( receiver , resource string ) New { return func ( f * jen . File , o types . Object ) { f . Commentf ( " " , o . Name ( ) ) f . Func ( ) . Params ( jen . Id ( receiver ) . Op ( " " ) . Id ( o . Name ( ) ) ) . Id ( " " ) . Params ( ) . Index ( ) . Qual ( resource , " " ) . Block ( jen . Id ( " " ) . Op ( " " ) . Make ( jen . Index ( ) . Qual ( resource , " " ) , jen . Len ( jen . Id ( receiver ) . Dot ( " " ) ) ) , jen . For ( jen . Id ( " " ) . Op ( " " ) . Range ( ) . Id ( receiver ) . Dot ( " " ) ) . Block ( jen . Id ( " " ) . Index ( jen . Id ( " " ) ) . Op ( " " ) . Qual ( resource , " " ) . Call ( jen . Op ( " " ) . Id ( receiver ) . Dot ( " " ) . Index ( jen . Id ( " " ) ) ) , ) , jen . Return ( jen . Id ( " " ) ) , ) } }
NewGetPortableClassItems returns a NewMethod that writes a
GetPortableClassItems method for the supplied Object to the supplied file.
NewGetPortableClassItems returns a NewMethod that writes a GetPortableClassItems method for the supplied Object to the supplied file .