Class: Ooor::Associations::CollectionProxy
- Defined in:
- lib/ooor/associations.rb
Overview
similar to ActiveRecord CollectionProxy but without lazy loading work yet
Instance Attribute Summary
Attributes inherited from Relation
#count_field, #create_with_value, #eager_load_values, #from_value, #group_values, #having_values, #includes_values, #joins_values, #klass, #limit_value, #loaded, #lock_value, #offset_value, #options, #order_values, #page_value, #per_value, #preload_values, #readonly_value, #reorder_flag, #select_values, #where_values
Instance Method Summary collapse
-
#class ⇒ Object
alias_method :to_a, :to_ary.
- #is_a?(*args) ⇒ Boolean
- #kind_of?(*args) ⇒ Boolean
- #to_ary ⇒ Object
Methods inherited from Relation
#all, #apply_finder_options, #build_where, #eager_loading?, #first, #initialize, #initialize_copy, #inspect, #last, #limit, #new, #offset, #order, #reload, #reset, #to_a, #where
Constructor Details
This class inherits a constructor from Ooor::Relation
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ooor::Relation
Instance Method Details
#class ⇒ Object
alias_method :to_a, :to_ary
12 13 14 |
# File 'lib/ooor/associations.rb', line 12 def class Array end |
#is_a?(*args) ⇒ Boolean
16 17 18 |
# File 'lib/ooor/associations.rb', line 16 def is_a?(*args) @records.is_a?(*args) end |
#kind_of?(*args) ⇒ Boolean
20 21 22 |
# File 'lib/ooor/associations.rb', line 20 def kind_of?(*args) @records.kind_of?(*args) end |
#to_ary ⇒ Object
7 8 9 |
# File 'lib/ooor/associations.rb', line 7 def to_ary to_a.dup end |