Module: StrictLoading::QueryMethods
- Defined in:
- lib/strict-loading/query_methods.rb
Instance Method Summary collapse
- #__check_relation ⇒ Object
- #strict_loading ⇒ Object
- #strict_loading! ⇒ Object
- #strict_loading_value ⇒ Object
- #strict_loading_value=(value) ⇒ Object
Instance Method Details
#__check_relation ⇒ Object
25 26 27 |
# File 'lib/strict-loading/query_methods.rb', line 25 def __check_relation assert_mutability! end |
#strict_loading ⇒ Object
5 6 7 |
# File 'lib/strict-loading/query_methods.rb', line 5 def strict_loading spawn.strict_loading! end |
#strict_loading! ⇒ Object
9 10 11 12 |
# File 'lib/strict-loading/query_methods.rb', line 9 def strict_loading! self.strict_loading_value = true self end |
#strict_loading_value ⇒ Object
14 15 16 |
# File 'lib/strict-loading/query_methods.rb', line 14 def strict_loading_value @values.fetch(:strict_loading, nil) end |
#strict_loading_value=(value) ⇒ Object
18 19 20 21 22 |
# File 'lib/strict-loading/query_methods.rb', line 18 def strict_loading_value=(value) raise ImmutableRelation if @loaded __check_relation @values[:strict_loading] = value end |