Module: TwitterConnect

Defined in:
lib/twitter_connect.rb

Class Method Summary collapse

Class Method Details

.configurationObject



11
12
13
# File 'lib/twitter_connect.rb', line 11

def configuration
  @configuration
end

.initObject



15
16
17
18
19
20
21
# File 'lib/twitter_connect.rb', line 15

def init
  unless File.exist?(File.join(Rails.root, "/public/javascripts/twitter_connect.js"))
    File.copy(File.join(File.dirname(__FILE__), "/public/javascripts/twitter_connect.js"), File.join(Rails.root, "/public/javascripts/twitter_connect.js"))
  end

  load_configuration("#{Rails.root}/config/twitter.yml")
end

.load_configuration(twitter_yaml_file) ⇒ Object



6
7
8
9
# File 'lib/twitter_connect.rb', line 6

def load_configuration(twitter_yaml_file)
  return false unless File.exist?(twitter_yaml_file)
  @configuration = YAML.load_file(twitter_yaml_file)[RAILS_ENV]
end