Class: ActsAsPreferenced::Store::Base
- Inherits:
-
Object
- Object
- ActsAsPreferenced::Store::Base
- Defined in:
- lib/acts_as_preferenced/store/base.rb
Overview
Base class for all stores for preferences
Direct Known Subclasses
Instance Attribute Summary collapse
-
#all_preferences ⇒ Object
readonly
Returns the value of attribute all_preferences.
-
#sections ⇒ Object
readonly
Returns the value of attribute sections.
-
#translation_scope ⇒ Object
readonly
Returns the value of attribute translation_scope.
Instance Method Summary collapse
-
#initialize(klass, translation_scope = nil) ⇒ Base
constructor
A new instance of Base.
- #section(name, options = {}) {|section| ... } ⇒ Object
Constructor Details
#initialize(klass, translation_scope = nil) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 |
# File 'lib/acts_as_preferenced/store/base.rb', line 9 def initialize( klass, translation_scope = nil ) @klass = klass @translation_scope = translation_scope @sections = Hash.new { |h,k| h[k] = [] } @all_preferences = [] end |
Instance Attribute Details
#all_preferences ⇒ Object (readonly)
Returns the value of attribute all_preferences.
7 8 9 |
# File 'lib/acts_as_preferenced/store/base.rb', line 7 def all_preferences @all_preferences end |
#sections ⇒ Object (readonly)
Returns the value of attribute sections.
7 8 9 |
# File 'lib/acts_as_preferenced/store/base.rb', line 7 def sections @sections end |
#translation_scope ⇒ Object (readonly)
Returns the value of attribute translation_scope.
7 8 9 |
# File 'lib/acts_as_preferenced/store/base.rb', line 7 def translation_scope @translation_scope end |