Class: Raml::Trait

Inherits:
Template show all
Defined in:
lib/raml/node/trait.rb

Defined Under Namespace

Classes: Instance

Instance Attribute Summary

Attributes inherited from ValueNode

#value

Attributes inherited from Node

#name, #parent

Instance Method Summary collapse

Methods inherited from Template

#interpolate

Methods inherited from ValueNode

#initialize

Methods inherited from Node

#initialize

Constructor Details

This class inherits a constructor from Raml::ValueNode

Instance Method Details

#instantiate(params) ⇒ Raml::Trait::Instance

Instantiate a new trait with the given parameters.

Parameters:

  • params (Hash)

    the parameters to interpolate in the trait.

Returns:


14
15
16
# File 'lib/raml/node/trait.rb', line 14

def instantiate(params)
	Instance.new( *interpolate(params), @parent )
end