Class: Ahnnotate::Index
- Inherits:
-
Object
- Object
- Ahnnotate::Index
- Defined in:
- lib/ahnnotate/index.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#name ⇒ Object
Returns the value of attribute name.
-
#unique ⇒ Object
Returns the value of attribute unique.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Index
constructor
A new instance of Index.
- #presentable_columns ⇒ Object
- #presentable_unique ⇒ Object
Constructor Details
#initialize(**args) ⇒ Index
Returns a new instance of Index.
8 9 10 11 12 |
# File 'lib/ahnnotate/index.rb', line 8 def initialize(**args) args.each do |key, value| public_send("#{key}=", value) end end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
4 5 6 |
# File 'lib/ahnnotate/index.rb', line 4 def columns @columns end |
#comment ⇒ Object
Returns the value of attribute comment.
5 6 7 |
# File 'lib/ahnnotate/index.rb', line 5 def comment @comment end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/ahnnotate/index.rb', line 3 def name @name end |
#unique ⇒ Object
Returns the value of attribute unique.
6 7 8 |
# File 'lib/ahnnotate/index.rb', line 6 def unique @unique end |
Instance Method Details
#presentable_columns ⇒ Object
14 15 16 |
# File 'lib/ahnnotate/index.rb', line 14 def presentable_columns "(#{columns.join(", ")})" end |
#presentable_unique ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/ahnnotate/index.rb', line 18 def presentable_unique if unique "UNIQUE" else "" end end |