Sha256: 998058b83fc3bee469c0b26724accad9f15b4bb190bf0318641fb08b389cb47a

Contents?: true

Size: 283 Bytes

Versions: 9

Compression:

Stored size: 283 Bytes

Contents

module Settingson::Base

  extend ActiveSupport::Concern

  module ClassMethods

    def method_missing(string, *args)
      if result = find_by(name: string)
        YAML.load result.value
      else
        ::Settingson::Store.new(self, string, *args)
      end
    end

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
settingson-1.1.17 app/models/concerns/settingson/base.rb
settingson-1.1.15 app/models/concerns/settingson/base.rb
settingson-1.1.14 app/models/concerns/settingson/base.rb
settingson-1.1.11 app/models/concerns/settingson/base.rb
settingson-1.1.10 app/models/concerns/settingson/base.rb
settingson-1.1.9 app/models/concerns/settingson/base.rb
settingson-1.0.0 app/models/concerns/settingson/base.rb
settingson-0.1.6 app/models/concerns/settingson/base.rb
settingson-0.1.1 app/models/concerns/settingson/base.rb