Class: Goldiloader::ScopeInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/goldiloader/scope_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope) ⇒ ScopeInfo

Returns a new instance of ScopeInfo.



7
8
9
# File 'lib/goldiloader/scope_info.rb', line 7

def initialize(scope)
  @scope = scope
end

Instance Attribute Details

#scopeObject (readonly)

Returns the value of attribute scope.



5
6
7
# File 'lib/goldiloader/scope_info.rb', line 5

def scope
  @scope
end

Instance Method Details

#auto_include?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/goldiloader/scope_info.rb', line 19

def auto_include?
  scope.auto_include_value
end

#from?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/goldiloader/scope_info.rb', line 23

def from?
  scope.from_clause.present?
end

#group?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/goldiloader/scope_info.rb', line 27

def group?
  scope.group_values.present?
end

#limit?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/goldiloader/scope_info.rb', line 15

def limit?
  scope.limit_value.present?
end

#offset?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/goldiloader/scope_info.rb', line 11

def offset?
  scope.offset_value.present?
end

#order?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/goldiloader/scope_info.rb', line 31

def order?
  scope.order_values.present?
end