sorbet/rbi/gems/rails_autolink@1.1.8.rbi
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `rails_autolink` gem.
# Please instead update this file by running `bin/tapioca gem rails_autolink`.
# source://rails_autolink//lib/rails_autolink/helpers.rb#9
module ActionView
class << self
# source://actionview/7.1.3.4/lib/action_view/deprecator.rb#4
def deprecator; end
# source://actionview/7.1.3.4/lib/action_view.rb#93
def eager_load!; end
# source://actionview/7.1.3.4/lib/action_view/gem_version.rb#5
def gem_version; end
# source://actionview/7.1.3.4/lib/action_view/version.rb#7
def version; end
end
end
# source://rails_autolink//lib/rails_autolink/helpers.rb#10
module ActionView::Helpers
include ::ActionView::Helpers::SanitizeHelper
include ::ActionView::Helpers::TextHelper
include ::ActionView::Helpers::UrlHelper
include ::ActionView::Helpers::SanitizeHelper
include ::ActionView::Helpers::TextHelper
include ::ActionView::Helpers::FormTagHelper
include ::ActionView::Helpers::FormHelper
include ::ActionView::Helpers::TranslationHelper
mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods
mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods
class << self
# source://actionview/7.1.3.4/lib/action_view/helpers.rb#35
def eager_load!; end
end
end
# source://rails_autolink//lib/rails_autolink/helpers.rb#11
module ActionView::Helpers::TextHelper
include ::ActionView::Helpers::CaptureHelper
include ::ActionView::Helpers::SanitizeHelper
mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods
# Turns all URLs and e-mail addresses into clickable links. The <tt>:link</tt> option
# will limit what should be linked. You can add HTML attributes to the links using
# <tt>:html</tt>. Possible values for <tt>:link</tt> are <tt>:all</tt> (default),
# <tt>:email_addresses</tt>, and <tt>:urls</tt>. If a block is given, each URL and
# e-mail address is yielded and the result is used as the link text. By default the
# text given is sanitized, you can override this behaviour setting the
# <tt>:sanitize</tt> option to false, or you can add options to the sanitization of
# the text using the <tt>:sanitize_options</tt> option hash.
#
# ==== Examples
# auto_link("Go to http://www.rubyonrails.org and say hello to david@loudthinking.com")
# # => "Go to <a href=\"http://www.rubyonrails.org\">http://www.rubyonrails.org</a> and
# # say hello to <a href=\"mailto:david@loudthinking.com\">david@loudthinking.com</a>"
#
# auto_link("Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com", :link => :urls)
# # => "Visit <a href=\"http://www.loudthinking.com/\">http://www.loudthinking.com/</a>
# # or e-mail david@loudthinking.com"
#
# auto_link("Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com", :link => :email_addresses)
# # => "Visit http://www.loudthinking.com/ or e-mail <a href=\"mailto:david@loudthinking.com\">david@loudthinking.com</a>"
#
# post_body = "Welcome to my new blog at http://www.myblog.com/. Please e-mail me at me@email.com."
# auto_link(post_body, :html => { :target => '_blank' }) do |text|
# truncate(text, :length => 15)
# end
# # => "Welcome to my new blog at <a href=\"http://www.myblog.com/\" target=\"_blank\">http://www.m...</a>.
# Please e-mail me at <a href=\"mailto:me@email.com\">me@email.com</a>."
#
#
# You can still use <tt>auto_link</tt> with the old API that accepts the
# +link+ as its optional second parameter and the +html_options+ hash
# as its optional third parameter:
# post_body = "Welcome to my new blog at http://www.myblog.com/. Please e-mail me at me@email.com."
# auto_link(post_body, :urls)
# # => "Welcome to my new blog at <a href=\"http://www.myblog.com/\">http://www.myblog.com</a>.
# Please e-mail me at me@email.com."
#
# auto_link(post_body, :all, :target => "_blank")
# # => "Welcome to my new blog at <a href=\"http://www.myblog.com/\" target=\"_blank\">http://www.myblog.com</a>.
# Please e-mail me at <a href=\"mailto:me@email.com\">me@email.com</a>."
#
# source://rails_autolink//lib/rails_autolink/helpers.rb#52
def auto_link(text, *args, &block); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#63
def concat(string); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#454
def current_cycle(name = T.unsafe(nil)); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#430
def cycle(first_value, *values); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#235
def excerpt(text, phrase, options = T.unsafe(nil)); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#174
def highlight(text, phrases, options = T.unsafe(nil), &block); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#290
def pluralize(count, singular, plural_arg = T.unsafe(nil), plural: T.unsafe(nil), locale: T.unsafe(nil)); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#477
def reset_cycle(name = T.unsafe(nil)); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#67
def safe_concat(string); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#376
def simple_format(text, html_options = T.unsafe(nil), options = T.unsafe(nil)); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#122
def truncate(text, options = T.unsafe(nil), &block); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#320
def word_wrap(text, line_width: T.unsafe(nil), break_sequence: T.unsafe(nil)); end
private
# Turns all email addresses into clickable links. If a block is given,
# each email is yielded and the result is used as the link text.
#
# source://rails_autolink//lib/rails_autolink/helpers.rb#127
def auto_link_email_addresses(text, html_options = T.unsafe(nil), options = T.unsafe(nil)); end
# Turns all urls into clickable links. If a block is given, each url
# is yielded and the result is used as the link text.
#
# source://rails_autolink//lib/rails_autolink/helpers.rb#90
def auto_link_urls(text, html_options = T.unsafe(nil), options = T.unsafe(nil)); end
# Detects already linked context or position in the middle of a tag
#
# @return [Boolean]
#
# source://rails_autolink//lib/rails_autolink/helpers.rb#146
def auto_linked?(left, right); end
# source://rails_autolink//lib/rails_autolink/helpers.rb#155
def conditional_html_safe(target, condition); end
# source://rails_autolink//lib/rails_autolink/helpers.rb#151
def conditional_sanitize(target, condition, sanitize_options = T.unsafe(nil)); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#540
def cut_excerpt_part(part_position, part, separator, options); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#522
def get_cycle(name); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#527
def set_cycle(name, cycle_object); end
# source://actionview/7.1.3.4/lib/action_view/helpers/text_helper.rb#532
def split_paragraphs(text); end
end
# source://rails_autolink//lib/rails_autolink/helpers.rb#81
ActionView::Helpers::TextHelper::AUTO_EMAIL_LOCAL_RE = T.let(T.unsafe(nil), Regexp)
# source://rails_autolink//lib/rails_autolink/helpers.rb#82
ActionView::Helpers::TextHelper::AUTO_EMAIL_RE = T.let(T.unsafe(nil), Regexp)
# regexps for determining context, used high-volume
#
# source://rails_autolink//lib/rails_autolink/helpers.rb#79
ActionView::Helpers::TextHelper::AUTO_LINK_CRE = T.let(T.unsafe(nil), Array)
# source://rails_autolink//lib/rails_autolink/helpers.rb#73
ActionView::Helpers::TextHelper::AUTO_LINK_RE = T.let(T.unsafe(nil), Regexp)
# source://rails_autolink//lib/rails_autolink/helpers.rb#84
ActionView::Helpers::TextHelper::BRACKETS = T.let(T.unsafe(nil), Hash)
# source://rails_autolink//lib/rails_autolink/helpers.rb#86
ActionView::Helpers::TextHelper::WORD_PATTERN = T.let(T.unsafe(nil), String)
# source://rails_autolink//lib/rails_autolink.rb#1
module RailsAutolink; end
# source://rails_autolink//lib/rails_autolink.rb#2
class RailsAutolink::Railtie < ::Rails::Railtie; end