Class: ActiveScaffold::Config::Base

Inherits:
Object
  • Object
show all
Extended by:
ActiveScaffold::Configurable
Includes:
ActiveScaffold::Configurable
Defined in:
lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb

Defined Under Namespace

Classes: UserSettings

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ActiveScaffold::Configurable

configure, method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable

Instance Attribute Details

#userObject

the user property gets set to the instantiation of the local UserSettings class during the automatic instantiation of this class.



24
25
26
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb', line 24

def user
  @user
end

Class Method Details

.inherited(subclass) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb', line 6

def self.inherited(subclass)
  class << subclass
    # the crud type of the action. possible values are :create, :read, :update, :destroy, 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, :destroy].include?(val.to_sym)
      @crud_type = val.to_sym
    end
  end
end

Instance Method Details

#crud_typeObject

delegate



21
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb', line 21

def crud_type; self.class.crud_type end

#formatsObject



37
38
39
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb', line 37

def formats
  @formats ||= []
end

#formats=(val) ⇒ Object



41
42
43
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb', line 41

def formats=(val)
  @formats=val
end