Class: Fields
- Inherits:
-
Object
- Object
- Fields
- Defined in:
- lib/mongoid_erd.rb
Instance Attribute Summary collapse
-
#edge ⇒ Object
Returns the value of attribute edge.
-
#erd_label ⇒ Object
Returns the value of attribute erd_label.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#edge ⇒ Object
Returns the value of attribute edge.
6 7 8 |
# File 'lib/mongoid_erd.rb', line 6 def edge @edge end |
#erd_label ⇒ Object
Returns the value of attribute erd_label.
6 7 8 |
# File 'lib/mongoid_erd.rb', line 6 def erd_label @erd_label end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/mongoid_erd.rb', line 6 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/mongoid_erd.rb', line 6 def type @type end |
Instance Method Details
#as_row ⇒ Object
7 8 9 10 11 12 |
# File 'lib/mongoid_erd.rb', line 7 def as_row str = type == "function" ? '+ ' + name : '- ' + name str += ":" + type unless type == "function" str += ", #{erd_label}" if erd_label and erd_label.size > 0 str end |