Class: Upmin::Graph::DataNode
- Inherits:
-
Object
- Object
- Upmin::Graph::DataNode
- Defined in:
- lib/upmin/graph/data_node.rb
Instance Method Summary collapse
- #data ⇒ Object (also: #object)
- #depth ⇒ Object
- #editable? ⇒ Boolean
- #form_id ⇒ Object
- #form_name ⇒ Object
-
#initialize(data, options = {}) ⇒ DataNode
constructor
A new instance of DataNode.
- #method_name ⇒ Object
- #options ⇒ Object
- #parent_name ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(data, options = {}) ⇒ DataNode
Returns a new instance of DataNode.
3 4 5 6 |
# File 'lib/upmin/graph/data_node.rb', line 3 def initialize(data, = {}) @data = data @options = end |
Instance Method Details
#data ⇒ Object Also known as: object
8 9 10 |
# File 'lib/upmin/graph/data_node.rb', line 8 def data return @data end |
#depth ⇒ Object
17 18 19 |
# File 'lib/upmin/graph/data_node.rb', line 17 def depth return [:depth] ||= 0 end |
#editable? ⇒ Boolean
21 22 23 24 |
# File 'lib/upmin/graph/data_node.rb', line 21 def editable? return [:editable] unless [:editable].nil? return [:editable] = false end |
#form_id ⇒ Object
42 43 44 |
# File 'lib/upmin/graph/data_node.rb', line 42 def form_id return "#{parent_name}_#{method_name}" end |
#form_name ⇒ Object
38 39 40 |
# File 'lib/upmin/graph/data_node.rb', line 38 def form_name return "#{parent_name}[#{method_name}]" end |
#method_name ⇒ Object
30 31 32 |
# File 'lib/upmin/graph/data_node.rb', line 30 def method_name return [:method_name] || nil end |
#options ⇒ Object
13 14 15 |
# File 'lib/upmin/graph/data_node.rb', line 13 def return @options end |
#parent_name ⇒ Object
34 35 36 |
# File 'lib/upmin/graph/data_node.rb', line 34 def parent_name return [:parent_name] || nil end |
#type ⇒ Object
26 27 28 |
# File 'lib/upmin/graph/data_node.rb', line 26 def type return [:type] ||= determine_type end |