Class: Model
- Inherits:
-
Object
- Object
- Model
- Defined in:
- lib/mongoid_erd.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
Returns the value of attribute attrs.
-
#erd_label ⇒ Object
Returns the value of attribute erd_label.
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#tag ⇒ Object
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize ⇒ Model
constructor
A new instance of Model.
- #title ⇒ Object
Constructor Details
#initialize ⇒ Model
Returns a new instance of Model.
17 18 19 20 |
# File 'lib/mongoid_erd.rb', line 17 def initialize @attrs = Hash.new @fields = Array.new end |
Instance Attribute Details
#attrs ⇒ Object
Returns the value of attribute attrs.
16 17 18 |
# File 'lib/mongoid_erd.rb', line 16 def attrs @attrs end |
#erd_label ⇒ Object
Returns the value of attribute erd_label.
16 17 18 |
# File 'lib/mongoid_erd.rb', line 16 def erd_label @erd_label end |
#fields ⇒ Object
Returns the value of attribute fields.
16 17 18 |
# File 'lib/mongoid_erd.rb', line 16 def fields @fields end |
#name ⇒ Object
Returns the value of attribute name.
16 17 18 |
# File 'lib/mongoid_erd.rb', line 16 def name @name end |
#parent ⇒ Object
Returns the value of attribute parent.
16 17 18 |
# File 'lib/mongoid_erd.rb', line 16 def parent @parent end |
#tag ⇒ Object
Returns the value of attribute tag.
16 17 18 |
# File 'lib/mongoid_erd.rb', line 16 def tag @tag end |
Instance Method Details
#title ⇒ Object
22 23 24 |
# File 'lib/mongoid_erd.rb', line 22 def title "- [#{name.camelize}:#{erd_label}] -" end |