Jira (PUP-7062) Exception thrown when implementing create in both child and parent provider

2017-01-04 Thread Moses Mendoza (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Moses Mendoza commented on  PUP-7062 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Exception thrown when implementing create in both child and parent provider  
 
 
 
 
 
 
 
 
 
 
Hi Nicolai Marck Ødum - thanks for filing. 
In the definition of myOtherProvider, I believe you'll want to change super.create to just super. I.e., 
 
 
 
 
 
 
Puppet::Type.type(:mytype).provide(:myOtherProvider, :parent => :myProvider) do 
 
 
 
 
  
 
 
 
 
  has_feature :myfeature 
 
 
 
 
  def create 
 
 
 
 
#do something 
 
 
 
 
puts "child" 
 
 
 
 
super 
 
 
 
 
  end 
 
 
 
 
end
 
 
 
 
 
 
 
super is a special keyword in ruby, and when invoked will call the current method name on the parent class - in this case, the create method of the parent class. It's not an object and doesn't have 

Jira (PUP-7062) Exception thrown when implementing create in both child and parent provider

2017-01-04 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Nicolai Marck Ødum created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7062 
 
 
 
  Exception thrown when implementing create in both child and parent provider  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Affects Versions:
 

 PUP 3.8.7 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Components:
 

 Types and Providers 
 
 
 

Created:
 

 2017/01/04 4:38 AM 
 
 
 

Environment:
 
 
Ubuntu 14.0.4 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Nicolai Marck Ødum 
 
 
 
 
 
 
 
 
 
 
Given this pseudo code 
 
 
 
 
 
 
Puppet::Type.newtype(:mytype) do