Class: ParamsReady::Helpers::RelationBuilderWrapper
- Inherits:
-
Object
- Object
- ParamsReady::Helpers::RelationBuilderWrapper
- Defined in:
- lib/params_ready/helpers/relation_builder_wrapper.rb
Instance Method Summary collapse
- #capture(*names) ⇒ Object
-
#initialize(cache, *args, **opts) ⇒ RelationBuilderWrapper
constructor
A new instance of RelationBuilderWrapper.
- #respond_to_missing?(name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(cache, *args, **opts) ⇒ RelationBuilderWrapper
Returns a new instance of RelationBuilderWrapper.
6 7 8 9 |
# File 'lib/params_ready/helpers/relation_builder_wrapper.rb', line 6 def initialize(cache, *args, **opts) @cache = cache @builder = Query::RelationParameterBuilder.instance *args, **opts end |
Instance Method Details
#capture(*names) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/params_ready/helpers/relation_builder_wrapper.rb', line 11 def capture(*names) names.each do |name| definition = @cache.parameter_definition(name) @builder.add definition end end |
#respond_to_missing?(name, include_private = false) ⇒ Boolean
26 27 28 29 30 31 32 |
# File 'lib/params_ready/helpers/relation_builder_wrapper.rb', line 26 def respond_to_missing?(name, include_private = false) if @builder.respond_to? name true else super end end |