Module: SurveyorParserSurveyTranslationMethods

Defined in:
lib/surveyor/parser.rb

Overview

SurveySection model

Instance Method Summary collapse

Instance Method Details

#parse_and_build(context, args, original_method, reference_identifier) ⇒ Object



179
180
181
182
183
184
# File 'lib/surveyor/parser.rb', line 179

def parse_and_build(context, args, original_method, reference_identifier)
  # build, no change in context
  args[0].each do |k,v|
    context[:survey].translations << self.class.new(:locale => k.to_s, :translation => File.read(Rails.root.join("surveys", v)))
  end
end