Class: ActiveScaffold::Config::Base
- Extended by:
- ActiveScaffold::Configurable
- Includes:
- ActiveScaffold::Configurable
- Defined in:
- lib/active_scaffold/config/base.rb
Defined Under Namespace
Classes: UserSettings
Instance Attribute Summary collapse
-
#action_group ⇒ Object
action_group this action should belong to.
-
#core ⇒ Object
readonly
Returns the value of attribute core.
-
#user ⇒ Object
the user property gets set to the instantiation of the local UserSettings class during the automatic instantiation of this class.
Class Method Summary collapse
Instance Method Summary collapse
-
#crud_type ⇒ Object
delegate.
- #formats ⇒ Object
- #formats=(val) ⇒ Object
-
#initialize(core_config) ⇒ Base
constructor
A new instance of Base.
Methods included from ActiveScaffold::Configurable
Constructor Details
#initialize(core_config) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 11 |
# File 'lib/active_scaffold/config/base.rb', line 6 def initialize(core_config) @core = core_config @action_group = self.class.action_group.clone if self.class.action_group # start with the ActionLink defined globally @link = self.class.link.clone if self.class.respond_to?(:link) && self.class.link end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable
Instance Attribute Details
#action_group ⇒ Object
action_group this action should belong to
40 41 42 |
# File 'lib/active_scaffold/config/base.rb', line 40 def action_group @action_group end |
#core ⇒ Object (readonly)
Returns the value of attribute core.
12 13 14 |
# File 'lib/active_scaffold/config/base.rb', line 12 def core @core end |
#user ⇒ Object
the user property gets set to the instantiation of the local UserSettings class during the automatic instantiation of this class.
33 34 35 |
# File 'lib/active_scaffold/config/base.rb', line 33 def user @user end |
Class Method Details
.inherited(subclass) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/active_scaffold/config/base.rb', line 14 def self.inherited(subclass) class << subclass # the crud type of the action. possible values are :create, :read, :update, :delete, and nil. # this is not a setting for the developer. it's self-description for the actions. def crud_type; @crud_type; end protected def crud_type=(val) raise ArgumentError, "unknown CRUD type #{val}" unless [:create, :read, :update, :delete].include?(val.to_sym) @crud_type = val.to_sym end end end |
Instance Method Details
#crud_type ⇒ Object
delegate
30 |
# File 'lib/active_scaffold/config/base.rb', line 30 def crud_type; self.class.crud_type end |
#formats ⇒ Object
53 54 55 |
# File 'lib/active_scaffold/config/base.rb', line 53 def formats @formats ||= [] end |
#formats=(val) ⇒ Object
57 58 59 |
# File 'lib/active_scaffold/config/base.rb', line 57 def formats=(val) @formats=val end |