Class: SpreadsheetBuilder::NoteContentColumn
- Inherits:
-
StringColumn
- Object
- StringColumn
- SpreadsheetBuilder::NoteContentColumn
- Defined in:
- backend/app/model/spreadsheet_builder.rb
Instance Attribute Summary collapse
-
#note_jsonmodel ⇒ Object
Returns the value of attribute note_jsonmodel.
Attributes inherited from StringColumn
#column, #index, #jsonmodel, #locked, #name, #property_name, #width
Instance Method Summary collapse
-
#header_label ⇒ Object
-
#initialize(jsonmodel, name, note_jsonmodel = 'note_multipart', opts = {}) ⇒ NoteContentColumn
constructor
A new instance of NoteContentColumn.
-
#multipart? ⇒ Boolean
-
#path ⇒ Object
Methods inherited from StringColumn
#sanitise_incoming_value, #value_for
Constructor Details
#initialize(jsonmodel, name, note_jsonmodel = 'note_multipart', opts = {}) ⇒ NoteContentColumn
Returns a new instance of NoteContentColumn.
102 103 104 105 |
# File 'backend/app/model/spreadsheet_builder.rb', line 102 def initialize(jsonmodel, name, note_jsonmodel = 'note_multipart', opts = {}) super(jsonmodel, name, opts) @note_jsonmodel = note_jsonmodel end |
Instance Attribute Details
#note_jsonmodel ⇒ Object
Returns the value of attribute note_jsonmodel
100 101 102 |
# File 'backend/app/model/spreadsheet_builder.rb', line 100 def note_jsonmodel @note_jsonmodel end |
Instance Method Details
#header_label ⇒ Object
107 108 109 |
# File 'backend/app/model/spreadsheet_builder.rb', line 107 def header_label "#{I18n.t('note._singular')} #{I18n.t("enumerations.#{@note_jsonmodel}_type.#{@name}")} - #{index + 1} - Content" end |
#multipart? ⇒ Boolean
115 116 117 |
# File 'backend/app/model/spreadsheet_builder.rb', line 115 def multipart? @note_jsonmodel == 'note_multipart' end |
#path ⇒ Object
111 112 113 |
# File 'backend/app/model/spreadsheet_builder.rb', line 111 def path [@jsonmodel.to_s, @name.to_s, @index.to_s, 'content'].join('/') end |