Module: ActiveParams
- Defined in:
- lib/active_params.rb,
lib/active_params/parser.rb,
lib/active_params/version.rb,
lib/active_params/controller.rb
Defined Under Namespace
Modules: Controller, Parser
Constant Summary collapse
- VERSION =
"1.0.0"
Class Attribute Summary collapse
-
.path ⇒ Object
Returns the value of attribute path.
-
.scope ⇒ Object
Returns the value of attribute scope.
-
.writing ⇒ Object
Returns the value of attribute writing.
Class Method Summary collapse
-
.config {|_self| ... } ⇒ Object
ActiveParams.config {|c| .… }.
-
.included(base) ⇒ Object
‘include ActiveParams` use default settings.
-
.setup(options = {}) ⇒ Object
‘include ActiveParams.setup(…)` customize.
Class Attribute Details
.path ⇒ Object
Returns the value of attribute path.
7 8 9 |
# File 'lib/active_params.rb', line 7 def path @path end |
.scope ⇒ Object
Returns the value of attribute scope.
7 8 9 |
# File 'lib/active_params.rb', line 7 def scope @scope end |
.writing ⇒ Object
Returns the value of attribute writing.
7 8 9 |
# File 'lib/active_params.rb', line 7 def writing @writing end |
Class Method Details
.config {|_self| ... } ⇒ Object
ActiveParams.config {|c| .… }
10 11 12 |
# File 'lib/active_params.rb', line 10 def config yield self end |
.included(base) ⇒ Object
‘include ActiveParams` use default settings
15 16 17 |
# File 'lib/active_params.rb', line 15 def included(base) base.send(:include, setup) end |
.setup(options = {}) ⇒ Object
‘include ActiveParams.setup(…)` customize
20 21 22 23 24 25 26 27 28 |
# File 'lib/active_params.rb', line 20 def setup( = {}) Module.new do def self.included(base) base.send(:include, ActiveParams::Controller) end end.tap do |m| m.send(:define_method, :active_params_options) { } end end |