titleist 0.1.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/tests.yml +19 -0
  3. data/.gitignore +1 -2
  4. data/.rubocop.yml +26 -1
  5. data/.ruby-version +1 -1
  6. data/Gemfile +13 -2
  7. data/README.md +95 -25
  8. data/Rakefile +17 -6
  9. data/docs/index.md +7 -0
  10. data/lib/generators/titleist/titleist_generator.rb +3 -0
  11. data/lib/titleist.rb +14 -9
  12. data/lib/titleist/controller.rb +36 -0
  13. data/lib/titleist/engine.rb +10 -4
  14. data/lib/titleist/helper.rb +23 -0
  15. data/lib/titleist/title.rb +52 -89
  16. data/lib/titleist/version.rb +5 -1
  17. data/rbi/sord.rbi +117 -0
  18. data/sorbet/config +2 -0
  19. data/sorbet/rbi/gems/actioncable.rbi +318 -0
  20. data/sorbet/rbi/gems/actionmailbox.rbi +56 -0
  21. data/sorbet/rbi/gems/actionmailer.rbi +446 -0
  22. data/sorbet/rbi/gems/actionpack.rbi +3411 -0
  23. data/sorbet/rbi/gems/actiontext.rbi +79 -0
  24. data/sorbet/rbi/gems/actionview.rbi +1185 -0
  25. data/sorbet/rbi/gems/activejob.rbi +362 -0
  26. data/sorbet/rbi/gems/activemodel.rbi +749 -0
  27. data/sorbet/rbi/gems/activerecord.rbi +5713 -0
  28. data/sorbet/rbi/gems/activestorage.rbi +221 -0
  29. data/sorbet/rbi/gems/activesupport.rbi +2437 -0
  30. data/sorbet/rbi/gems/addressable.rbi +146 -0
  31. data/sorbet/rbi/gems/ast.rbi +47 -0
  32. data/sorbet/rbi/gems/capybara.rbi +1787 -0
  33. data/sorbet/rbi/gems/childprocess.rbi +106 -0
  34. data/sorbet/rbi/gems/codeclimate-test-reporter.rbi +125 -0
  35. data/sorbet/rbi/gems/concurrent-ruby.rbi +1587 -0
  36. data/sorbet/rbi/gems/crass.rbi +92 -0
  37. data/sorbet/rbi/gems/docile.rbi +29 -0
  38. data/sorbet/rbi/gems/erubi.rbi +26 -0
  39. data/sorbet/rbi/gems/globalid.rbi +98 -0
  40. data/sorbet/rbi/gems/i18n.rbi +191 -0
  41. data/sorbet/rbi/gems/jaro_winkler.rbi +14 -0
  42. data/sorbet/rbi/gems/loofah.rbi +129 -0
  43. data/sorbet/rbi/gems/mail.rbi +1582 -0
  44. data/sorbet/rbi/gems/marcel.rbi +12 -0
  45. data/sorbet/rbi/gems/method_source.rbi +63 -0
  46. data/sorbet/rbi/gems/mini_mime.rbi +51 -0
  47. data/sorbet/rbi/gems/minitest.rbi +419 -0
  48. data/sorbet/rbi/gems/mocha.rbi +794 -0
  49. data/sorbet/rbi/gems/nio4r.rbi +67 -0
  50. data/sorbet/rbi/gems/nokogiri.rbi +1010 -0
  51. data/sorbet/rbi/gems/parallel.rbi +81 -0
  52. data/sorbet/rbi/gems/parser.rbi +920 -0
  53. data/sorbet/rbi/gems/public_suffix.rbi +103 -0
  54. data/sorbet/rbi/gems/puma.rbi +586 -0
  55. data/sorbet/rbi/gems/rack-test.rbi +161 -0
  56. data/sorbet/rbi/gems/rack.rbi +634 -0
  57. data/sorbet/rbi/gems/rails-dom-testing.rbi +67 -0
  58. data/sorbet/rbi/gems/rails-html-sanitizer.rbi +91 -0
  59. data/sorbet/rbi/gems/railties.rbi +834 -0
  60. data/sorbet/rbi/gems/rainbow.rbi +117 -0
  61. data/sorbet/rbi/gems/rake.rbi +269 -0
  62. data/sorbet/rbi/gems/regexp_parser.rbi +912 -0
  63. data/sorbet/rbi/gems/rubocop.rbi +7232 -0
  64. data/sorbet/rbi/gems/ruby-progressbar.rbi +304 -0
  65. data/sorbet/rbi/gems/rubyzip.rbi +546 -0
  66. data/sorbet/rbi/gems/selenium-webdriver.rbi +1450 -0
  67. data/sorbet/rbi/gems/simplecov-html.rbi +30 -0
  68. data/sorbet/rbi/gems/simplecov.rbi +189 -0
  69. data/sorbet/rbi/gems/site_ruby.rbi +265 -0
  70. data/sorbet/rbi/gems/sprockets-rails.rbi +105 -0
  71. data/sorbet/rbi/gems/sprockets.rbi +753 -0
  72. data/sorbet/rbi/gems/sqlite3.rbi +353 -0
  73. data/sorbet/rbi/gems/thor.rbi +579 -0
  74. data/sorbet/rbi/gems/thread_safe.rbi +81 -0
  75. data/sorbet/rbi/gems/tzinfo.rbi +405 -0
  76. data/sorbet/rbi/gems/unicode-display_width.rbi +16 -0
  77. data/sorbet/rbi/gems/webdrivers.rbi +155 -0
  78. data/sorbet/rbi/gems/xpath.rbi +158 -0
  79. data/sorbet/rbi/gems/yard.rbi +1159 -0
  80. data/sorbet/rbi/hidden-definitions/errors.txt +14957 -0
  81. data/sorbet/rbi/hidden-definitions/hidden.rbi +24898 -0
  82. data/sorbet/rbi/sorbet-typed/lib/actionmailer/all/actionmailer.rbi +13 -0
  83. data/sorbet/rbi/sorbet-typed/lib/actionpack/all/actionpack.rbi +938 -0
  84. data/sorbet/rbi/sorbet-typed/lib/actionview/all/actionview.rbi +314 -0
  85. data/sorbet/rbi/sorbet-typed/lib/activemodel/all/activemodel.rbi +425 -0
  86. data/sorbet/rbi/sorbet-typed/lib/activerecord/>=5.2/activerecord.rbi +17 -0
  87. data/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1425 -0
  88. data/sorbet/rbi/sorbet-typed/lib/activerecord/~>6.0.0/activerecord.rbi +475 -0
  89. data/sorbet/rbi/sorbet-typed/lib/activestorage/>=6.0.0/activestorage.rbi +19 -0
  90. data/sorbet/rbi/sorbet-typed/lib/activestorage/all/activestorage.rbi +173 -0
  91. data/sorbet/rbi/sorbet-typed/lib/activesupport/>=6.0.0.rc1/activesupport.rbi +23 -0
  92. data/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +858 -0
  93. data/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +8684 -0
  94. data/sorbet/rbi/sorbet-typed/lib/minitest/all/minitest.rbi +108 -0
  95. data/sorbet/rbi/sorbet-typed/lib/railties/all/railties.rbi +25 -0
  96. data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +254 -0
  97. data/sorbet/rbi/sorbet-typed/lib/ruby/all/gem.rbi +4222 -0
  98. data/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +111 -0
  99. data/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +543 -0
  100. data/sorbet/rbi/todo.rbi +20 -0
  101. data/titleist.gemspec +3 -14
  102. metadata +96 -155
  103. data/.travis.yml +0 -45
  104. data/app/controllers/.keep +0 -0
  105. data/app/helpers/.keep +0 -0
  106. data/app/helpers/titleist_helper.rb +0 -47
  107. data/app/mailers/.keep +0 -0
  108. data/app/models/.keep +0 -0
  109. data/app/views/.keep +0 -0
@@ -1,150 +1,113 @@
1
+ # typed: true
2
+
1
3
  module Titleist
2
4
  # Object that turns passed-in scope details into a String of title
3
5
  # text derived from the +I18n+ locale configuration.
4
6
  class Title
5
- # Top-level scope in the i18n locale for all title configuration.
6
- ROOT_SCOPE = :titles
7
-
8
- # @!attribute controller [r]
9
- # @return [String] Controller name of the current request.
10
- attr_reader :controller
11
-
12
- # @!attribute action [r]
13
- # @return [String] Action name of the current request.
14
- attr_reader :action
15
-
16
- # @!attribute context [r]
17
- # @return [Hash] Passed-in context from the helper method.
18
- attr_reader :context
19
-
20
- # @param controller [String] Current request controller name.
21
- # @param action [String] Current request action name.
22
- # @param context [Hash] Optional params passed in from the helper.
23
- # @param root [Boolean] Whether this is the root path
24
- def initialize(controller: '', action: '', context: {}, root: false)
7
+ extend T::Sig
8
+
9
+ # Default title format that can be overridden by changing the i18n
10
+ # key `titelist.format`.
11
+ FORMAT = '%{page} - %{app}'.freeze
12
+
13
+ # @param [String] controller - Current request controller name.
14
+ # @param [String] action - Current request action name.
15
+ # @param [Hash] context - Optional params passed in from the helper.
16
+ # @return [Titleist::Title]
17
+ def initialize(controller:, action:, **context)
25
18
  @controller = controller
26
19
  @action = action
27
- @context = context
28
- @root = root
20
+ @params = context
21
+ end
22
+
23
+ # Read title context
24
+ #
25
+ # @param [Symbol] key
26
+ # @return [String] the value or `nil`
27
+ def [](key)
28
+ @params[key]
29
+ end
30
+
31
+ # Write title context
32
+ #
33
+ # @param [Symbol] key
34
+ # @param [String] value
35
+ # @return [String] the value
36
+ def []=(key, value)
37
+ @params[key] = value
29
38
  end
30
39
 
31
40
  # Global application title.
32
41
  #
33
42
  # @return [String]
34
43
  def app
35
- I18n.t :application, context.merge(
36
- scope: ROOT_SCOPE,
44
+ @app ||= I18n.t :title, @params.reverse_merge(
45
+ scope: %i[layouts application],
37
46
  default: default_app_title
38
47
  )
39
48
  end
40
49
 
41
- # Page title from given scope.
50
+ # Page title from the current scope.
42
51
  #
43
52
  # @return [String]
44
53
  def page
45
- @page ||= I18n.t action.to_sym, context.merge(
46
- scope: scope,
54
+ @page ||= I18n.t :title, @params.reverse_merge(
55
+ scope: [*controller_scope, @action],
47
56
  default: default_page_title
48
57
  )
49
58
  end
50
59
 
51
- # @!attribute page [w]
52
- # Override the given scope and set a new page title.
60
+ # @!attribute page [rw]
61
+ # Override the current page title
53
62
  # @return [String]
54
63
  attr_writer :page
55
64
 
56
- # Format this title as a +String+.
65
+ # Format the full page title.
57
66
  #
58
67
  # @return [String]
59
68
  def to_s
60
- return app if root?
61
-
62
- I18n.t :format, to_h
63
- end
64
-
65
- # Format this title as a +Hash+ of attributes.
66
- #
67
- # @return [Hash]
68
- def to_h
69
- {
70
- scope: ROOT_SCOPE,
71
- app: app,
72
- page: page
73
- }
74
- end
75
-
76
- # Whether the page we're generating a title for is the root path.
77
- # This will cause no page title to display, and is set when the
78
- # title object is instantiated.
79
- #
80
- # @return [Boolean]
81
- def root?
82
- @root
69
+ I18n.t :format, scope: :titleist, default: FORMAT, app: app, page: page
83
70
  end
84
71
 
85
72
  private
86
73
 
87
- # Use the default configured app title in +Rails.configuration+ or
88
- # the derived app title if one is not specified.
89
- #
90
74
  # @private
91
- # @return [String] Default application title from module or config.
75
+ # @return [String]
92
76
  def default_app_title
93
- Rails.configuration.titleist.app_title || derived_app_title
94
- end
95
-
96
- # Derive app title by titleizing the application module name if one
97
- # is not configured.
98
- #
99
- # @private
100
- # @return [String] Default app title guessed from module name.
101
- def derived_app_title
102
- Rails.application.class.name.deconstantize.titleize
77
+ Rails.application.class.name&.deconstantize&.titleize.to_s
103
78
  end
104
79
 
105
- # Default title of the current page, if one cannot be found.
106
- #
107
80
  # @private
108
- # @return [String] Action title combined with resource title.
81
+ # @return [String]
109
82
  def default_page_title
110
- return controller.titleize if action == 'index'
83
+ return @controller.titleize if @action == 'index'
111
84
 
112
85
  [action_title, resource_title].join(' ')
113
86
  end
114
87
 
115
- # Default title verb for the current action.
116
- #
117
88
  # @private
118
- # @return [String] "View", "Delete", or the titleized +action+.
89
+ # @return [String]
119
90
  def action_title
120
- case action
91
+ case @action
121
92
  when 'show'
122
93
  'View'
123
94
  when 'destroy'
124
95
  'Delete'
125
96
  else
126
- action.titleize
97
+ @action.titleize
127
98
  end
128
99
  end
129
100
 
130
- # Default title of the resource the controller is operating on.
131
- #
132
101
  # @private
133
- # @return [String] Singularized controller name.
102
+ # @return [String]
134
103
  def resource_title
135
- controller.singularize.titleize
104
+ @controller.singularize.titleize
136
105
  end
137
106
 
138
- # Scope for +I18n+ derived from the controller name and root.
139
- #
140
107
  # @private
141
- # @return [Array] Derived i18n scope.
142
- def scope
143
- @scope ||= [ROOT_SCOPE, *demodulized_controller]
144
- end
145
-
146
- def demodulized_controller
147
- controller.split('/').map(&:to_sym)
108
+ # @return [Array<String>]
109
+ def controller_scope
110
+ @controller.split('/')
148
111
  end
149
112
  end
150
113
  end
@@ -1,3 +1,7 @@
1
+ # typed: true
1
2
  module Titleist
2
- VERSION = '0.1.1'.freeze
3
+ # Current version of this library.
4
+ #
5
+ # @return [String]
6
+ VERSION = '1.0.0'.freeze
3
7
  end
@@ -0,0 +1,117 @@
1
+ # typed: strong
2
+ # typed: false
3
+ module Titleist
4
+ extend ActiveSupport::Autoload
5
+ VERSION = T.let('1.0.0'.freeze, T.untyped)
6
+
7
+ # Object that turns passed-in scope details into a String of title
8
+ # text derived from the +I18n+ locale configuration.
9
+ class Title
10
+ extend T::Sig
11
+ FORMAT = T.let('%{page} - %{app}'.freeze, T.untyped)
12
+
13
+ # _@param_ `controller` — - Current request controller name.
14
+ #
15
+ # _@param_ `action` — - Current request action name.
16
+ #
17
+ # _@param_ `context` — - Optional params passed in from the helper.
18
+ sig { params(controller: String, action: String, context: T::Hash[T.untyped, T.untyped]).void }
19
+ def initialize(controller:, action:, **context); end
20
+
21
+ # Read title context
22
+ #
23
+ # _@param_ `key`
24
+ #
25
+ # _@return_ — the value or `nil`
26
+ sig { params(key: Symbol).returns(String) }
27
+ def [](key); end
28
+
29
+ # Write title context
30
+ #
31
+ # _@param_ `key`
32
+ #
33
+ # _@param_ `value`
34
+ #
35
+ # _@return_ — the value
36
+ sig { params(key: Symbol, value: String).returns(String) }
37
+ def []=(key, value); end
38
+
39
+ # Global application title.
40
+ sig { returns(String) }
41
+ def app; end
42
+
43
+ # Format the full page title.
44
+ sig { returns(String) }
45
+ def to_s; end
46
+
47
+ sig { returns(String) }
48
+ def default_app_title; end
49
+
50
+ sig { returns(String) }
51
+ def default_page_title; end
52
+
53
+ sig { returns(String) }
54
+ def action_title; end
55
+
56
+ sig { returns(String) }
57
+ def resource_title; end
58
+
59
+ sig { returns(T::Array[String]) }
60
+ def controller_scope; end
61
+
62
+ # Override the current page title
63
+ sig { returns(T.any(String, T.untyped)) }
64
+ attr_accessor :page
65
+ end
66
+
67
+ # Extensions into the Rails framework that mixin the controller and
68
+ # helper modules when ActionController and ActionView are loaded.
69
+ class Engine < Rails::Engine
70
+ end
71
+
72
+ # Helper methods in ActionView for rendering the title.
73
+ module Helper
74
+ extend T::Sig
75
+
76
+ # Render the full title as a `<title>` tag.
77
+ sig { returns(String) }
78
+ def title_tag; end
79
+
80
+ sig { returns(String) }
81
+ def title_text; end
82
+ end
83
+
84
+ # Controller mixins for reading titles without ActionView
85
+ module Controller
86
+ extend ActiveSupport::Concern
87
+ extend T::Sig
88
+
89
+ # Generate the full page title for this request. When output into the
90
+ # view, the entire title is shown. You may also call +title.page+ or
91
+ # +title.app+ to view individual pieces of the title.
92
+ sig { returns(Titleist::Title) }
93
+ def title; end
94
+
95
+ # Shorthand for calling +title.app+ in the view.
96
+ #
97
+ # _@return_ — i18n-configured global application title.
98
+ sig { returns(String) }
99
+ def app_title; end
100
+
101
+ # Shorthand for calling +title.page+ in the view.
102
+ #
103
+ # _@return_ — i18n-configured title for the current page.
104
+ sig { returns(String) }
105
+ def page_title; end
106
+ end
107
+ end
108
+
109
+ # typed: true
110
+ # Generate initial files for the gem to work.
111
+ class TitleistGenerator < Rails::Generators::Base
112
+ sig { returns(T.nilable(T.any())) }
113
+ def copy_locale; end
114
+
115
+ sig { returns(T.nilable(T.any())) }
116
+ def update_default_application_layout; end
117
+ end
@@ -0,0 +1,2 @@
1
+ --dir
2
+ .
@@ -0,0 +1,318 @@
1
+ # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
+ # srb rbi gems
3
+
4
+ # typed: strong
5
+ #
6
+ # If you would like to make changes to this file, great! Please create the gem's shim here:
7
+ #
8
+ # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/actioncable/all/actioncable.rbi
9
+ #
10
+ # actioncable-6.0.2.1
11
+ module ActionCable
12
+ def self.gem_version; end
13
+ def self.server; end
14
+ def self.version; end
15
+ def server; end
16
+ extend ActiveSupport::Autoload
17
+ end
18
+ module ActionCable::VERSION
19
+ end
20
+ module ActionCable::Helpers
21
+ end
22
+ module ActionCable::Helpers::ActionCableHelper
23
+ def action_cable_meta_tag; end
24
+ end
25
+ class ActionCable::Engine < Rails::Engine
26
+ end
27
+ module ActionCable::Server
28
+ extend ActiveSupport::Autoload
29
+ end
30
+ module ActionCable::Server::Broadcasting
31
+ def broadcast(broadcasting, message, coder: nil); end
32
+ def broadcaster_for(broadcasting, coder: nil); end
33
+ end
34
+ class ActionCable::Server::Broadcasting::Broadcaster
35
+ def broadcast(message); end
36
+ def broadcasting; end
37
+ def coder; end
38
+ def initialize(server, broadcasting, coder:); end
39
+ def server; end
40
+ end
41
+ module ActionCable::Server::Connections
42
+ def add_connection(connection); end
43
+ def connections; end
44
+ def open_connections_statistics; end
45
+ def remove_connection(connection); end
46
+ def setup_heartbeat_timer; end
47
+ end
48
+ class ActionCable::Server::Configuration
49
+ def allow_same_origin_as_host; end
50
+ def allow_same_origin_as_host=(arg0); end
51
+ def allowed_request_origins; end
52
+ def allowed_request_origins=(arg0); end
53
+ def cable; end
54
+ def cable=(arg0); end
55
+ def connection_class; end
56
+ def connection_class=(arg0); end
57
+ def disable_request_forgery_protection; end
58
+ def disable_request_forgery_protection=(arg0); end
59
+ def initialize; end
60
+ def log_tags; end
61
+ def log_tags=(arg0); end
62
+ def logger; end
63
+ def logger=(arg0); end
64
+ def mount_path; end
65
+ def mount_path=(arg0); end
66
+ def pubsub_adapter; end
67
+ def url; end
68
+ def url=(arg0); end
69
+ def worker_pool_size; end
70
+ def worker_pool_size=(arg0); end
71
+ end
72
+ class ActionCable::Server::Worker
73
+ def __callbacks; end
74
+ def __callbacks?; end
75
+ def _run_work_callbacks(&block); end
76
+ def _work_callbacks; end
77
+ def async_exec(receiver, *args, connection:, &block); end
78
+ def async_invoke(receiver, method, *args, connection: nil, &block); end
79
+ def connection; end
80
+ def connection=(obj); end
81
+ def executor; end
82
+ def halt; end
83
+ def initialize(max_size: nil); end
84
+ def invoke(receiver, method, *args, connection:, &block); end
85
+ def logger; end
86
+ def self.__callbacks; end
87
+ def self.__callbacks=(val); end
88
+ def self.__callbacks?; end
89
+ def self._work_callbacks; end
90
+ def self._work_callbacks=(value); end
91
+ def self.connection; end
92
+ def self.connection=(obj); end
93
+ def stopping?; end
94
+ def work(connection); end
95
+ extend ActiveSupport::Callbacks::ClassMethods
96
+ extend ActiveSupport::DescendantsTracker
97
+ include ActionCable::Server::Worker::ActiveRecordConnectionManagement
98
+ include ActiveSupport::Callbacks
99
+ end
100
+ module ActionCable::Server::Worker::ActiveRecordConnectionManagement
101
+ def with_database_connections; end
102
+ extend ActiveSupport::Concern
103
+ end
104
+ module ActionCable::Channel
105
+ extend ActiveSupport::Autoload
106
+ end
107
+ module ActionCable::Channel::Callbacks
108
+ extend ActiveSupport::Concern
109
+ include ActiveSupport::Callbacks
110
+ end
111
+ module ActionCable::Channel::Callbacks::ClassMethods
112
+ def after_subscribe(*methods, &block); end
113
+ def after_unsubscribe(*methods, &block); end
114
+ def before_subscribe(*methods, &block); end
115
+ def before_unsubscribe(*methods, &block); end
116
+ def on_subscribe(*methods, &block); end
117
+ def on_unsubscribe(*methods, &block); end
118
+ end
119
+ module ActionCable::Channel::PeriodicTimers
120
+ def active_periodic_timers; end
121
+ def start_periodic_timer(callback, every:); end
122
+ def start_periodic_timers; end
123
+ def stop_periodic_timers; end
124
+ extend ActiveSupport::Concern
125
+ end
126
+ module ActionCable::Channel::PeriodicTimers::ClassMethods
127
+ def periodically(callback_or_method_name = nil, every:, &block); end
128
+ end
129
+ module ActionCable::Channel::Streams
130
+ def default_stream_handler(broadcasting, coder:); end
131
+ def identity_handler; end
132
+ def pubsub(*args, &block); end
133
+ def stop_all_streams; end
134
+ def stream_decoder(handler = nil, coder:); end
135
+ def stream_for(model, callback = nil, coder: nil, &block); end
136
+ def stream_from(broadcasting, callback = nil, coder: nil, &block); end
137
+ def stream_handler(broadcasting, user_handler, coder: nil); end
138
+ def stream_transmitter(handler = nil, broadcasting:); end
139
+ def streams; end
140
+ def worker_pool_stream_handler(broadcasting, user_handler, coder: nil); end
141
+ extend ActiveSupport::Concern
142
+ end
143
+ module ActionCable::Channel::Naming
144
+ def channel_name(*args, &block); end
145
+ extend ActiveSupport::Concern
146
+ end
147
+ module ActionCable::Channel::Naming::ClassMethods
148
+ def channel_name; end
149
+ end
150
+ module ActionCable::Channel::Broadcasting
151
+ def broadcast_to(*args, &block); end
152
+ def broadcasting_for(*args, &block); end
153
+ extend ActiveSupport::Concern
154
+ end
155
+ module ActionCable::Channel::Broadcasting::ClassMethods
156
+ def broadcast_to(model, message); end
157
+ def broadcasting_for(model); end
158
+ def serialize_broadcasting(object); end
159
+ end
160
+ class ActionCable::Channel::Base
161
+ def __callbacks; end
162
+ def __callbacks?; end
163
+ def _run_subscribe_callbacks(&block); end
164
+ def _run_unsubscribe_callbacks(&block); end
165
+ def _subscribe_callbacks; end
166
+ def _unsubscribe_callbacks; end
167
+ def action_signature(action, data); end
168
+ def connection; end
169
+ def defer_subscription_confirmation!; end
170
+ def defer_subscription_confirmation?; end
171
+ def delegate_connection_identifiers; end
172
+ def dispatch_action(action, data); end
173
+ def ensure_confirmation_sent; end
174
+ def extract_action(data); end
175
+ def identifier; end
176
+ def initialize(connection, identifier, params = nil); end
177
+ def logger(*args, &block); end
178
+ def params; end
179
+ def perform_action(data); end
180
+ def periodic_timers=(val); end
181
+ def processable_action?(action); end
182
+ def reject; end
183
+ def reject_subscription; end
184
+ def rescue_handlers; end
185
+ def rescue_handlers=(val); end
186
+ def rescue_handlers?; end
187
+ def self.__callbacks; end
188
+ def self.__callbacks=(val); end
189
+ def self.__callbacks?; end
190
+ def self._subscribe_callbacks; end
191
+ def self._subscribe_callbacks=(value); end
192
+ def self._unsubscribe_callbacks; end
193
+ def self._unsubscribe_callbacks=(value); end
194
+ def self.action_methods; end
195
+ def self.clear_action_methods!; end
196
+ def self.method_added(name); end
197
+ def self.periodic_timers; end
198
+ def self.periodic_timers=(val); end
199
+ def self.periodic_timers?; end
200
+ def self.rescue_handlers; end
201
+ def self.rescue_handlers=(val); end
202
+ def self.rescue_handlers?; end
203
+ def subscribe_to_channel; end
204
+ def subscribed; end
205
+ def subscription_confirmation_sent?; end
206
+ def subscription_rejected?; end
207
+ def transmit(data, via: nil); end
208
+ def transmit_subscription_confirmation; end
209
+ def transmit_subscription_rejection; end
210
+ def unsubscribe_from_channel; end
211
+ def unsubscribed; end
212
+ extend ActionCable::Channel::Broadcasting::ClassMethods
213
+ extend ActionCable::Channel::Callbacks::ClassMethods
214
+ extend ActionCable::Channel::Naming::ClassMethods
215
+ extend ActionCable::Channel::PeriodicTimers::ClassMethods
216
+ extend ActiveSupport::Callbacks::ClassMethods
217
+ extend ActiveSupport::DescendantsTracker
218
+ extend ActiveSupport::Rescuable::ClassMethods
219
+ include ActionCable::Channel::Broadcasting
220
+ include ActionCable::Channel::Callbacks
221
+ include ActionCable::Channel::Naming
222
+ include ActionCable::Channel::PeriodicTimers
223
+ include ActionCable::Channel::Streams
224
+ include ActiveSupport::Callbacks
225
+ include ActiveSupport::Rescuable
226
+ end
227
+ class ActionCable::Server::Base
228
+ def call(env); end
229
+ def config; end
230
+ def connection_identifiers; end
231
+ def disconnect(identifiers); end
232
+ def event_loop; end
233
+ def initialize(config: nil); end
234
+ def logger(*args, &block); end
235
+ def mutex; end
236
+ def pubsub; end
237
+ def remote_connections; end
238
+ def restart; end
239
+ def self.config; end
240
+ def self.config=(obj); end
241
+ def self.logger; end
242
+ def worker_pool; end
243
+ include ActionCable::Server::Broadcasting
244
+ include ActionCable::Server::Connections
245
+ end
246
+ module ActionCable::Connection
247
+ extend ActiveSupport::Autoload
248
+ end
249
+ module ActionCable::Connection::Identification
250
+ def connection_gid(ids); end
251
+ def connection_identifier; end
252
+ extend ActiveSupport::Concern
253
+ end
254
+ module ActionCable::Connection::Identification::ClassMethods
255
+ def identified_by(*identifiers); end
256
+ end
257
+ module ActionCable::Connection::InternalChannel
258
+ def internal_channel; end
259
+ def process_internal_message(message); end
260
+ def subscribe_to_internal_channel; end
261
+ def unsubscribe_from_internal_channel; end
262
+ extend ActiveSupport::Concern
263
+ end
264
+ module ActionCable::Connection::Authorization
265
+ def reject_unauthorized_connection; end
266
+ end
267
+ class ActionCable::Connection::Authorization::UnauthorizedError < StandardError
268
+ end
269
+ class ActionCable::Connection::Base
270
+ def allow_request_origin?; end
271
+ def beat; end
272
+ def close(reason: nil, reconnect: nil); end
273
+ def cookies; end
274
+ def decode(websocket_message); end
275
+ def dispatch_websocket_message(websocket_message); end
276
+ def encode(cable_message); end
277
+ def env; end
278
+ def event_loop(*args, &block); end
279
+ def finished_request_message; end
280
+ def handle_close; end
281
+ def handle_open; end
282
+ def identifiers; end
283
+ def identifiers=(val); end
284
+ def identifiers?; end
285
+ def initialize(server, env, coder: nil); end
286
+ def invalid_request_message; end
287
+ def logger; end
288
+ def message_buffer; end
289
+ def new_tagged_logger; end
290
+ def on_close(reason, code); end
291
+ def on_error(message); end
292
+ def on_message(message); end
293
+ def on_open; end
294
+ def process; end
295
+ def protocol; end
296
+ def pubsub(*args, &block); end
297
+ def receive(websocket_message); end
298
+ def request; end
299
+ def respond_to_invalid_request; end
300
+ def respond_to_successful_request; end
301
+ def self.identifiers; end
302
+ def self.identifiers=(val); end
303
+ def self.identifiers?; end
304
+ def send_async(method, *arguments); end
305
+ def send_welcome_message; end
306
+ def server; end
307
+ def started_request_message; end
308
+ def statistics; end
309
+ def subscriptions; end
310
+ def successful_request_message; end
311
+ def transmit(cable_message); end
312
+ def websocket; end
313
+ def worker_pool; end
314
+ extend ActionCable::Connection::Identification::ClassMethods
315
+ include ActionCable::Connection::Authorization
316
+ include ActionCable::Connection::Identification
317
+ include ActionCable::Connection::InternalChannel
318
+ end