Sha256: abdbe84df12fc2155d4ec9585a85ebdd93d758cf48cc185ec662bda2c32c520f

Contents?: true

Size: 455 Bytes

Versions: 8

Compression:

Stored size: 455 Bytes

Contents

module Docusigner
  class Settings < Docusigner::Base
    singleton

    belongs_to :account

    def [](setting)
      as = accountSettings.detect{|as| as.name == setting}
      as ? as.attributes["value"] : nil
    end

    class << self
      def instantiate_record(record, prefix_options)
        super({
          :accountSettings => record,
          :account_id => prefix_options[:account_id]
        }, prefix_options)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
docusigner-0.0.9 lib/docusigner/settings.rb
docusigner-0.0.8 lib/docusigner/settings.rb
docusigner-0.0.6 lib/docusigner/settings.rb
docusigner-0.0.5 lib/docusigner/settings.rb
docusigner-0.0.4 lib/docusigner/settings.rb
docusigner-0.0.3 lib/docusigner/settings.rb
docusigner-0.0.2 lib/docusigner/settings.rb
docusigner-0.0.1 lib/docusigner/settings.rb