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.
-
#is_primary ⇒ Object
readonly
Returns the value of attribute is_primary.
-
#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, is_primary, prefix) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(key, heading, is_primary, prefix) ⇒ Column
Returns a new instance of Column.
9 10 11 12 13 14 15 |
# File 'lib/magic_report/report/row.rb', line 9 def initialize(key, heading, is_primary, prefix) @key = key @heading = heading @is_primary = is_primary @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 |
#is_primary ⇒ Object (readonly)
Returns the value of attribute is_primary.
7 8 9 |
# File 'lib/magic_report/report/row.rb', line 7 def is_primary @is_primary 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
17 18 19 |
# File 'lib/magic_report/report/row.rb', line 17 def assign_value(value) @value = value end |
#full_heading ⇒ Object
21 22 23 |
# File 'lib/magic_report/report/row.rb', line 21 def full_heading prefix.present? ? "#{prefix} #{heading}" : heading end |