Class: SuperList
- Inherits:
-
Object
- Object
- SuperList
- Defined in:
- lib/super_list.rb
Defined Under Namespace
Constant Summary collapse
- @@options =
{ :use_i18n => false}
- @@data =
ActiveSupport::OrderedHash.new
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, values, options = {}) ⇒ SuperList
constructor
A new instance of SuperList.
Constructor Details
#initialize(name, values, options = {}) ⇒ SuperList
Returns a new instance of SuperList.
12 13 14 15 16 |
# File 'lib/super_list.rb', line 12 def initialize(name, values, ={}) # { :use_i18n => false, :i18n_scope => 'super_list'} = @@options.merge(:i18n_scope => name).merge() @@data[name] = Data.new(values, ) end |
Class Method Details
.[](name) ⇒ Object
18 19 20 |
# File 'lib/super_list.rb', line 18 def self.[](name) @@data[name] end |
.default_option=(options) ⇒ Object
8 9 10 |
# File 'lib/super_list.rb', line 8 def self.default_option=() @@options.update() end |