Sha256: 4520ae9f841fd75ce52de79fabc0764a0b38e013ef308c907da618dd3fd69871
Contents?: true
Size: 522 Bytes
Versions: 3
Compression:
Stored size: 522 Bytes
Contents
# encoding: utf-8 require 'rails_best_practices/core/check' module RailsBestPractices module Prepares class ConfigPrepare < Core::Check interesting_nodes :assign interesting_files CONFIG_FILES def initialize @configs = Prepares.configs end add_callback :start_assign do |node| if node.left_value.grep_node(sexp_type: [:vcall, :var_ref], to_s: "config").present? @configs[node.left_value.to_s] = node.right_value.to_s end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems