Sha256: 03248a594d976dcc0ee47e7822d174a652c23eb06fdd1a805bce01fc4e56e15d

Contents?: true

Size: 893 Bytes

Versions: 15

Compression:

Stored size: 893 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

15 entries across 15 versions & 1 rubygems

Version Path
ecoportal-api-0.10.8 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.10.7 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.10.6 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.10.5 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.10.4 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.10.3 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.10.2 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.10.1 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.10.0 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.9.7 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.9.6 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.9.5 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.9.4 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.9.3 lib/ecoportal/api/internal/preferences.rb
ecoportal-api-0.9.2 lib/ecoportal/api/internal/preferences.rb