Class: SafetyPin::NodeBlueprint
- Inherits:
-
Object
- Object
- SafetyPin::NodeBlueprint
- Defined in:
- lib/safety_pin/node_blueprint.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#primary_type ⇒ Object
Returns the value of attribute primary_type.
-
#properties ⇒ Object
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(opts) ⇒ NodeBlueprint
constructor
A new instance of NodeBlueprint.
- #node_blueprint? ⇒ Boolean
Constructor Details
#initialize(opts) ⇒ NodeBlueprint
Returns a new instance of NodeBlueprint.
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
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/safety_pin/node_blueprint.rb', line 3 def path @path end |
#primary_type ⇒ Object
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 |
#properties ⇒ Object
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
12 13 14 |
# File 'lib/safety_pin/node_blueprint.rb', line 12 def node_blueprint? true end |