Class: MagicReport::Report::Row::Column
- Inherits:
-
Object
- Object
- MagicReport::Report::Row::Column
- Defined in:
- lib/magic_report/report/row.rb
Instance Attribute Summary collapse
-
#heading ⇒ Object
readonly
Returns the value of attribute heading.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #assign_value(value) ⇒ Object
- #full_heading ⇒ Object
-
#initialize(key, heading, prefix) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(key, heading, prefix) ⇒ Column
Returns a new instance of Column.
9 10 11 12 13 14 |
# File 'lib/magic_report/report/row.rb', line 9 def initialize(key, heading, prefix) @key = key @heading = heading @prefix = prefix @value = nil end |
Instance Attribute Details
#heading ⇒ Object (readonly)
Returns the value of attribute heading.
7 8 9 |
# File 'lib/magic_report/report/row.rb', line 7 def heading @heading end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
7 8 9 |
# File 'lib/magic_report/report/row.rb', line 7 def key @key end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
7 8 9 |
# File 'lib/magic_report/report/row.rb', line 7 def prefix @prefix end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/magic_report/report/row.rb', line 7 def value @value end |
Instance Method Details
#assign_value(value) ⇒ Object
16 17 18 |
# File 'lib/magic_report/report/row.rb', line 16 def assign_value(value) @value = value end |
#full_heading ⇒ Object
20 21 22 |
# File 'lib/magic_report/report/row.rb', line 20 def full_heading prefix ? "#{prefix} #{heading}" : heading end |