Class: Raml::ResourceType

Inherits:
Template show all
Defined in:
lib/raml/node/resource_type.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::ResourceType::Instance

Instantiate a new resource type with the given parameters.

Parameters:

  • params (Hash)

    the parameters to interpolate in the resource type.

Returns:



14
15
16
17
18
# File 'lib/raml/node/resource_type.rb', line 14

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