Class: ActiveRecordQuery::Joinable::JoinedResource

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record_query/concerns/joinable.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ JoinedResource

Returns a new instance of JoinedResource.



6
7
8
# File 'lib/active_record_query/concerns/joinable.rb', line 6

def initialize(resource)
  @resource = resource
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



10
11
12
# File 'lib/active_record_query/concerns/joinable.rb', line 10

def method_missing(m, *args, &block)
  Column.new(Arel::Table.new(resource), m)
end