Class: ArelConverter::Translator::Scope

Inherits:
Base
  • Object
show all
Defined in:
lib/arel_converter/translators/scope.rb

Constant Summary

Constants inherited from Base

Base::LINE_LENGTH

Instance Method Summary collapse

Methods inherited from Base

#format_for_hash, #logger, parse, translate

Instance Method Details

#post_processing(new_scope) ⇒ Object



10
11
12
13
# File 'lib/arel_converter/translators/scope.rb', line 10

def post_processing(new_scope)
  new_scope.gsub!(/scope\((.*)\)$/, 'scope \1')
  new_scope += format_options(@options)
end

#process_call(exp) ⇒ Object



5
6
7
8
# File 'lib/arel_converter/translators/scope.rb', line 5

def process_call(exp)
  @options = Options.translate(exp.pop) if exp[1] == :scope
  super
end