Class: SafetyPin::NodeBlueprint

Inherits:
Object
  • Object
show all
Defined in:
lib/safety_pin/node_blueprint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ NodeBlueprint

Returns a new instance of NodeBlueprint.

Raises:



5
6
7
8
9
10
# File 'lib/safety_pin/node_blueprint.rb', line 5

def initialize(opts)
  raise NodeBlueprintError.new("No path specified") unless opts.has_key?(:path)
  @path = opts[:path]
  @primary_type = opts[:primary_type] || "nt:unstructured"
  @properties = opts[:properties] || {}
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



3
4
5
# File 'lib/safety_pin/node_blueprint.rb', line 3

def path
  @path
end

#primary_typeObject

Returns the value of attribute primary_type.



3
4
5
# File 'lib/safety_pin/node_blueprint.rb', line 3

def primary_type
  @primary_type
end

#propertiesObject

Returns the value of attribute properties.



3
4
5
# File 'lib/safety_pin/node_blueprint.rb', line 3

def properties
  @properties
end

Instance Method Details

#node_blueprint?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/safety_pin/node_blueprint.rb', line 12

def node_blueprint?
  true
end