Sha256: 9befd1a568b6f50aded81403a9aca3a13f406d285873ec5e2ddfbfe76752f150

Contents?: true

Size: 263 Bytes

Versions: 38

Compression:

Stored size: 263 Bytes

Contents

class Configuration < ActiveRecord::Base
  serialize :data
  
  def self.[](key)
    key = find_by_key(key.to_s)
    key.nil? ? nil : key.data
  end
  
  def self.[]=(key, data)
    c = find_or_create_by_key(key.to_s)
    c.update_attribute :data, data
  end
end

Version data entries

38 entries across 38 versions & 15 rubygems

Version Path
anthonycrumley-twitter-0.3.8 lib/twitter/cli/models/configuration.rb
baron-twitter-0.4.2 lib/twitter/cli/models/configuration.rb
billymeltdown-twitter-0.3.8.1 lib/twitter/cli/models/configuration.rb
billymeltdown-twitter-0.4.2 lib/twitter/cli/models/configuration.rb
billymeltdown-twitter-0.4.3 lib/twitter/cli/models/configuration.rb
drnic-twitter-0.4.4.1 lib/twitter/cli/models/configuration.rb
dschn-twitter-0.3.7.1 lib/twitter/cli/models/configuration.rb
dschn-twitter-0.3.7.2 lib/twitter/cli/models/configuration.rb
dschn-twitter-0.4.1.1 lib/twitter/cli/models/configuration.rb
dschn-twitter-0.4.1.2 lib/twitter/cli/models/configuration.rb
dschn-twitter-0.4.1.3 lib/twitter/cli/models/configuration.rb
dschn-twitter-0.4.1 lib/twitter/cli/models/configuration.rb
dustin-twitter-0.3.2.1 lib/twitter/cli/models/configuration.rb
dustin-twitter-0.3.2.2 lib/twitter/cli/models/configuration.rb
dustin-twitter-0.3.7 lib/twitter/cli/models/configuration.rb
gilesbowkett-gilesbowkett-twitter-0.4.4 lib/twitter/cli/models/configuration.rb
gilesbowkett-twitter-0.4.3 lib/twitter/cli/models/configuration.rb
gilesbowkett-twitter-0.4.5 lib/twitter/cli/models/configuration.rb
handcrafted-twitter-0.4.0 lib/twitter/cli/models/configuration.rb
handcrafted-twitter-0.4.2 lib/twitter/cli/models/configuration.rb