Sha256: a8c20af963253af228b53f41841da5e4d48a7d957192b6096acef05d02eda048

Contents?: true

Size: 621 Bytes

Versions: 7

Compression:

Stored size: 621 Bytes

Contents

require 'whirled_peas/utils/title_font'

require_relative 'container_settings'

module WhirledPeas
  module Settings
    class GridSettings < ContainerSettings
      attr_accessor :num_cols

      def validate!
        super
        if num_cols.nil? || num_cols <= 0
          raise SettingsError, "`num_cols` must be set to a positive number for GridSettings"
        end
      end

      def set_scrollbar(*)
        raise NotImplementedError, 'Grids do not support scrollbars'
      end

      def sizing=(*)
        raise NotImplementedError, 'Grids only support the default sizing model'
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
whirled_peas-0.13.0 lib/whirled_peas/settings/grid_settings.rb
whirled_peas-0.12.0 lib/whirled_peas/settings/grid_settings.rb
whirled_peas-0.11.1 lib/whirled_peas/settings/grid_settings.rb
whirled_peas-0.11.0 lib/whirled_peas/settings/grid_settings.rb
whirled_peas-0.10.0 lib/whirled_peas/settings/grid_settings.rb
whirled_peas-0.9.1 lib/whirled_peas/settings/grid_settings.rb
whirled_peas-0.9.0 lib/whirled_peas/settings/grid_settings.rb