Sha256: c51cb573449f5ea5dbff716c643aba1eeca4b73c984c2e7323d1529e5e404a47

Contents?: true

Size: 566 Bytes

Versions: 2

Compression:

Stored size: 566 Bytes

Contents

# encoding: utf-8
#
module ZmeygoSync
  require 'yaml'
  require 'fileutils'

  class Configuration
    attr_accessor :server, :api_token, :locale_dir, :project

    def initialize
      conf_file = File.join(Rails.root,'config','zmeygo_sync.yml')
      conf_all = YAML.load_file(File.expand_path(conf_file))
      conf = conf_all[Rails.env]
#      conf['server'] = 'http://zmeygo.com'
      self.api_token = conf['api_token']
      self.project = conf['project']
    end

    def [](key)
      if self.respond_to?(key)
        send(key)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
zmeygo_sync-0.22 lib/zmeygo_sync/configuration.rb
zmeygo_sync-0.21 lib/zmeygo_sync/configuration.rb