Module: GEXF::Attribute::Definable
Instance Method Summary collapse
- #attribute_definitions ⇒ Object (also: #defined_attributes)
- #attributes ⇒ Object
- #define_attribute(id, title, opts = {}) ⇒ Object
Instance Method Details
#attribute_definitions ⇒ Object Also known as: defined_attributes
15 16 17 |
# File 'lib/gexf/attribute/definable.rb', line 15 def attribute_definitions @attribute_definitions ||= {} end |
#attributes ⇒ Object
8 9 10 11 12 13 |
# File 'lib/gexf/attribute/definable.rb', line 8 def attributes Hash[*map do |item| attributes = item.attributes [item.id, attributes] if attributes && attributes.any? end.compact.flatten] end |