Sha256: 02d955a3143106086edad10b3869b0681884a23f062b8e325797c4dd543482c4

Contents?: true

Size: 895 Bytes

Versions: 4

Compression:

Stored size: 895 Bytes

Contents

module Ecoportal
  module API
    class Internal
      class Preferences < Common::BaseModel
        passthrough  :kiosk_enabled, :kiosk_workflow_message, :kiosk_create_button_label,
            :kiosk_create_button_help, :kiosk_return_button_label, :kiosk_return_button_help,
            :kiosk_dashboard_button_label, :kiosk_dashboard_button_help

        [
          :show_sidebar,
          :show_shortcuts,
          :show_coming_soon,
          :show_recently_visited_forms,
          :show_tasks,
          :show_task_bubbles
        ].map(&:to_s).each do |field|
          define_method(field) do
            if doc.key?(field)
              doc[field]
            else
              true
            end
          end
          define_method("#{field}=") do |value|
            doc[field] = !!value
          end
        end

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
eco-helpers-1.3.19 lib/eco/api/common/version_patches/ecoportal_api/account_preferences.rb
eco-helpers-1.3.18 lib/eco/api/common/version_patches/ecoportal_api/account_preferences.rb
eco-helpers-1.3.17 lib/eco/api/common/version_patches/ecoportal_api/account_preferences.rb
eco-helpers-1.3.16 lib/eco/api/common/version_patches/ecoportal_api/account_preferences.rb