Class: AdminAssistant::AbstractSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/admin_assistant/builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_namesObject (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