File tree 5 files changed +15
-14
lines changed
5 files changed +15
-14
lines changed Original file line number Diff line number Diff line change 4
4
require "datagrid/configuration"
5
5
require "datagrid/engine"
6
6
7
- # @main README.md
8
7
module Datagrid
9
8
# @!visibility private
10
9
def self . included ( base )
@@ -19,15 +18,6 @@ def self.included(base)
19
18
end
20
19
end
21
20
22
- def self . configuration
23
- @configuration ||= Configuration . new
24
- end
25
-
26
- # Configure
27
- def self . configure ( &block )
28
- block . call ( configuration )
29
- end
30
-
31
21
class ConfigurationError < StandardError ; end
32
22
class ArgumentError < ::ArgumentError ; end
33
23
class ColumnUnavailableError < StandardError ; end
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
module Datagrid
4
+ # @return [Configuration] current Datagrid configuration
5
+ def self . configuration
6
+ @configuration ||= Configuration . new
7
+ end
8
+
9
+ # @yield block to configure
10
+ # @yieldparam [Configuration] configuration
11
+ # @yieldreturn [void]
12
+ # @return [void] configure datagrid
13
+ # @see Datagrid::Configuration
14
+ def self . configure ( &block )
15
+ block . call ( configuration )
16
+ end
17
+
4
18
# ## Configuration
5
19
#
6
20
# Datagrid provides several configuration options.
@@ -12,7 +26,7 @@ module Datagrid
12
26
# # Defines date formats that can be used to parse dates.
13
27
# # Note: Multiple formats can be specified. The first format is used to format dates as strings,
14
28
# # while other formats are used only for parsing dates from strings (e.g., if your app supports multiple formats).
15
- # config.date_formats = [ "%m/%d/%Y", "%Y-%m-%d"]
29
+ # config.date_formats = "%m/%d/%Y", "%Y-%m-%d"
16
30
#
17
31
# # Defines timestamp formats that can be used to parse timestamps.
18
32
# # Note: Multiple formats can be specified. The first format is used to format timestamps as strings,
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ class FilteringError < StandardError
7
7
end
8
8
end
9
9
10
- # @!visibility private
11
10
module Datagrid
12
11
module Filters
13
12
class BaseFilter
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
- # @!visibility private
4
3
module Datagrid
5
4
module Filters
6
5
class ExtendedBooleanFilter < Datagrid ::Filters ::EnumFilter
Original file line number Diff line number Diff line change 2
2
3
3
require "rails/generators"
4
4
5
- # @!visibility private
6
5
module Datagrid
7
6
# @!visibility private
8
7
module Generators
You can’t perform that action at this time.
0 commit comments