Class: ExcelTemplating::Document::DataSourceRegistry::RegistryList
- Inherits:
-
Object
- Object
- ExcelTemplating::Document::DataSourceRegistry::RegistryList
- Defined in:
- lib/excel_templating/document/data_source_registry/registry_list.rb
Overview
Represents a data source list used for validation of cell information
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#data_sheet? ⇒ Boolean
Is this to be rendered on the data sheet?.
-
#initialize(order, symbol, title, list, inline) ⇒ RegistryList
constructor
A new instance of RegistryList.
-
#inline? ⇒ Boolean
Is this to be rendered inline?.
-
#items(data) ⇒ Array<String>
The validation objects.
Constructor Details
#initialize(order, symbol, title, list, inline) ⇒ RegistryList
Returns a new instance of RegistryList.
9 10 11 12 13 14 15 16 |
# File 'lib/excel_templating/document/data_source_registry/registry_list.rb', line 9 def initialize(order, symbol, title, list, inline) @title = title @list = list @inline = inline @order = order @symbol = symbol pre_validate! end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
18 19 20 |
# File 'lib/excel_templating/document/data_source_registry/registry_list.rb', line 18 def list @list end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
18 19 20 |
# File 'lib/excel_templating/document/data_source_registry/registry_list.rb', line 18 def order @order end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
18 19 20 |
# File 'lib/excel_templating/document/data_source_registry/registry_list.rb', line 18 def symbol @symbol end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
18 19 20 |
# File 'lib/excel_templating/document/data_source_registry/registry_list.rb', line 18 def title @title end |
Instance Method Details
#data_sheet? ⇒ Boolean
Returns Is this to be rendered on the data sheet?.
26 27 28 |
# File 'lib/excel_templating/document/data_source_registry/registry_list.rb', line 26 def data_sheet? !inline? end |
#inline? ⇒ Boolean
Returns Is this to be rendered inline?.
21 22 23 |
# File 'lib/excel_templating/document/data_source_registry/registry_list.rb', line 21 def inline? @inline end |
#items(data) ⇒ Array<String>
Returns The validation objects.
32 33 34 35 36 37 38 |
# File 'lib/excel_templating/document/data_source_registry/registry_list.rb', line 32 def items(data) if list == :from_data data[symbol] else list end end |