module SmsRu::Config

Public Class Methods

current_scope_to_config(args) click to toggle source
# File lib/sms_ru/config.rb, line 13
def self.current_scope_to_config(args)
  @@current_scope.reverse.inject(args) { |a, n| { n => a } }
end
method_missing(m, *args) click to toggle source
# File lib/sms_ru/config.rb, line 17
def self.method_missing(m, *args)
  @@current_scope.push m.to_s.gsub('=', '').to_sym
  if m.match(/=/)
    @@configuration.deep_merge! current_scope_to_config(*args)
    @@current_scope = []
  else
    return self
  end
end