class ModelToGooglesheet::Configuration

Constants

OPTIONS

Public Class Methods

merge_configs(permethod_options, permodel_configuration) click to toggle source
# File lib/model_to_googlesheet.rb, line 60
def self.merge_configs permethod_options, permodel_configuration
        options = ActiveSupport::HashWithIndifferentAccess.new permethod_options
        ModelToGooglesheet::Configuration::OPTIONS.each do |option_name|
                options[option_name] ||= permodel_configuration.send(option_name)
        end
        options
end
new() click to toggle source

defaults

# File lib/model_to_googlesheet.rb, line 47
def initialize
        @client_id     = nil
        @client_secret = nil
        @refresh_token = nil
        @spreadsheet   = nil
        @worksheet     = nil
        @convert_with  = nil   #optional
        @update        = false #optional, will only be applied to separate records.
                #if set to true, finds a record in a sheet by :id and updates it.
                #if set to :symbol, finds a record in a sheet by :symbol and updates it
        @find_by       = :id
end