Class: AdminAssistant::AbstractSettings
- Inherits:
-
Object
- Object
- AdminAssistant::AbstractSettings
- Defined in:
- lib/admin_assistant/builder.rb
Direct Known Subclasses
BaseSettings, FormSettings, IndexSettings, IndexSettings::SearchSettings, ShowSettings
Instance Attribute Summary collapse
-
#column_names ⇒ Object
readonly
Returns the value of attribute column_names.
Instance Method Summary collapse
- #[](column_name) ⇒ Object
- #columns(*args) ⇒ Object
-
#initialize(admin_assistant) ⇒ AbstractSettings
constructor
A new instance of AbstractSettings.
Constructor Details
#initialize(admin_assistant) ⇒ AbstractSettings
Returns a new instance of AbstractSettings.
128 129 130 131 132 133 |
# File 'lib/admin_assistant/builder.rb', line 128 def initialize(admin_assistant) @admin_assistant = admin_assistant @column_configs = HashWithIndifferentAccess.new { |h, k| h[k] = ColumnConfig.new(column_config_fields) } end |
Instance Attribute Details
#column_names ⇒ Object (readonly)
Returns the value of attribute column_names.
126 127 128 |
# File 'lib/admin_assistant/builder.rb', line 126 def column_names @column_names end |
Instance Method Details
#[](column_name) ⇒ Object
135 136 137 |
# File 'lib/admin_assistant/builder.rb', line 135 def [](column_name) @column_configs[column_name] end |
#columns(*args) ⇒ Object
139 140 141 |
# File 'lib/admin_assistant/builder.rb', line 139 def columns(*args) @column_names = args end |