Ask Your Question
0

Inheritance or aliasing for custom types?

asked 2014-09-18 09:03:26 -0500

Arney gravatar image

Given a custom type 'database' as per this manual, is it possible to define in Ruby code (not manifests) a type 'datamaze' wihich is an alias or child of the 'database' type?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-09-18 12:01:11 -0500

domcleal gravatar image

It's not possible to inherit from one type to another (PUP-899 and linked PR), but you could do a couple of things:

  1. Move common parameters and property definitions into some sort of helper or mixin module
  2. Create a second type (optionally using mixins as above), but inherit from one provider to another (PUP-2458) to avoid copying the provider code
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-18 09:03:26 -0500

Seen: 263 times

Last updated: Sep 18 '14