Class: Tabloid::ReportColumn
- Inherits:
-
Object
- Object
- Tabloid::ReportColumn
- Defined in:
- lib/tabloid/report_column.rb
Instance Attribute Summary collapse
-
#hidden ⇒ Object
Returns the value of attribute hidden.
-
#key ⇒ Object
Returns the value of attribute key.
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
- #hidden? ⇒ Boolean
-
#initialize(key, label = "", options = {}) ⇒ ReportColumn
constructor
A new instance of ReportColumn.
- #to_header ⇒ Object
- #to_s ⇒ Object
- #total? ⇒ Boolean
Constructor Details
#initialize(key, label = "", options = {}) ⇒ ReportColumn
Returns a new instance of ReportColumn.
7 8 9 10 11 12 |
# File 'lib/tabloid/report_column.rb', line 7 def initialize(key, label = "", ={}) self.key = key self.label = label @hidden = [:hidden] @total = [:total] end |
Instance Attribute Details
#hidden ⇒ Object
Returns the value of attribute hidden.
5 6 7 |
# File 'lib/tabloid/report_column.rb', line 5 def hidden @hidden end |
#key ⇒ Object
Returns the value of attribute key.
3 4 5 |
# File 'lib/tabloid/report_column.rb', line 3 def key @key end |
#label ⇒ Object
Returns the value of attribute label.
4 5 6 |
# File 'lib/tabloid/report_column.rb', line 4 def label @label end |
Instance Method Details
#hidden? ⇒ Boolean
22 23 24 |
# File 'lib/tabloid/report_column.rb', line 22 def hidden? hidden end |
#to_header ⇒ Object
26 27 28 29 |
# File 'lib/tabloid/report_column.rb', line 26 def to_header return self.label if label return self.key end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/tabloid/report_column.rb', line 14 def to_s @key.to_s end |
#total? ⇒ Boolean
18 19 20 |
# File 'lib/tabloid/report_column.rb', line 18 def total? @total end |