Class: RedSnow::Sourcemap::NamedNode Abstract

Inherits:
Node
  • Object
show all
Defined in:
lib/redsnow/sourcemap.rb

Overview

This class is abstract.

Blueprint sourcemap node with name && description associated

Instance Attribute Summary collapse

Attributes inherited from Node

#collection

Instance Method Summary collapse

Constructor Details

#initialize(sourcemap) ⇒ NamedNode

Returns a new instance of NamedNode.

Parameters:

  • sourcemap (json array or nil)


46
47
48
49
50
51
# File 'lib/redsnow/sourcemap.rb', line 46

def initialize(sourcemap)
  return if sourcemap.nil?

  @name = SourceMap.new(sourcemap['name'])
  @description = SourceMap.new(sourcemap['description'])
end

Instance Attribute Details

#descriptionSourceMap

description of the node

Returns:

  • (SourceMap)

    the current value of description



41
42
43
# File 'lib/redsnow/sourcemap.rb', line 41

def description
  @description
end

#nameSourceMap

name of the node

Returns:



41
42
43
# File 'lib/redsnow/sourcemap.rb', line 41

def name
  @name
end