add telegram-bot-ruby
This commit is contained in:
3
Gemfile
3
Gemfile
@@ -132,6 +132,9 @@ gem "dtext_rb",
|
|||||||
ref: "5ef8fd7a5205c832f4c18197911717e7d491494e"
|
ref: "5ef8fd7a5205c832f4c18197911717e7d491494e"
|
||||||
gem "charlock_holmes"
|
gem "charlock_holmes"
|
||||||
|
|
||||||
|
# Telegram Bot API
|
||||||
|
gem "telegram-bot-ruby"
|
||||||
|
|
||||||
# gem "pghero", git: "https://github.com/dymk/pghero", ref: "e314f99"
|
# gem "pghero", git: "https://github.com/dymk/pghero", ref: "e314f99"
|
||||||
gem "pghero", "~> 3.6"
|
gem "pghero", "~> 3.6"
|
||||||
gem "pg_query", ">= 2"
|
gem "pg_query", ">= 2"
|
||||||
|
|||||||
42
Gemfile.lock
42
Gemfile.lock
@@ -176,6 +176,28 @@ GEM
|
|||||||
rubyzip (~> 2.0)
|
rubyzip (~> 2.0)
|
||||||
domain_name (0.6.20240107)
|
domain_name (0.6.20240107)
|
||||||
drb (2.2.3)
|
drb (2.2.3)
|
||||||
|
dry-core (1.1.0)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
logger
|
||||||
|
zeitwerk (~> 2.6)
|
||||||
|
dry-inflector (1.2.0)
|
||||||
|
dry-logic (1.6.0)
|
||||||
|
bigdecimal
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
dry-core (~> 1.1)
|
||||||
|
zeitwerk (~> 2.6)
|
||||||
|
dry-struct (1.8.0)
|
||||||
|
dry-core (~> 1.1)
|
||||||
|
dry-types (~> 1.8, >= 1.8.2)
|
||||||
|
ice_nine (~> 0.11)
|
||||||
|
zeitwerk (~> 2.6)
|
||||||
|
dry-types (1.8.3)
|
||||||
|
bigdecimal (~> 3.0)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
dry-core (~> 1.0)
|
||||||
|
dry-inflector (~> 1.0)
|
||||||
|
dry-logic (~> 1.4)
|
||||||
|
zeitwerk (~> 2.6)
|
||||||
enumerable-statistics (2.0.8)
|
enumerable-statistics (2.0.8)
|
||||||
erubi (1.13.1)
|
erubi (1.13.1)
|
||||||
et-orbi (1.2.11)
|
et-orbi (1.2.11)
|
||||||
@@ -189,6 +211,14 @@ GEM
|
|||||||
faiss (0.3.2)
|
faiss (0.3.2)
|
||||||
numo-narray
|
numo-narray
|
||||||
rice (>= 4.0.2)
|
rice (>= 4.0.2)
|
||||||
|
faraday (2.13.4)
|
||||||
|
faraday-net_http (>= 2.0, < 3.5)
|
||||||
|
json
|
||||||
|
logger
|
||||||
|
faraday-multipart (1.1.1)
|
||||||
|
multipart-post (~> 2.0)
|
||||||
|
faraday-net_http (3.4.1)
|
||||||
|
net-http (>= 0.5.0)
|
||||||
ffi (1.17.1-aarch64-linux-gnu)
|
ffi (1.17.1-aarch64-linux-gnu)
|
||||||
ffi (1.17.1-aarch64-linux-musl)
|
ffi (1.17.1-aarch64-linux-musl)
|
||||||
ffi (1.17.1-arm64-darwin)
|
ffi (1.17.1-arm64-darwin)
|
||||||
@@ -240,6 +270,7 @@ GEM
|
|||||||
http-form_data (2.3.0)
|
http-form_data (2.3.0)
|
||||||
i18n (1.14.7)
|
i18n (1.14.7)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
ice_nine (0.11.2)
|
||||||
io-console (0.8.0)
|
io-console (0.8.0)
|
||||||
irb (1.14.3)
|
irb (1.14.3)
|
||||||
rdoc (>= 4.0.0)
|
rdoc (>= 4.0.0)
|
||||||
@@ -247,6 +278,7 @@ GEM
|
|||||||
jbuilder (2.13.0)
|
jbuilder (2.13.0)
|
||||||
actionview (>= 5.0.0)
|
actionview (>= 5.0.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
|
json (2.13.2)
|
||||||
kaminari (1.2.2)
|
kaminari (1.2.2)
|
||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
kaminari-actionview (= 1.2.2)
|
kaminari-actionview (= 1.2.2)
|
||||||
@@ -288,8 +320,11 @@ GEM
|
|||||||
mmh3 (1.2.0)
|
mmh3 (1.2.0)
|
||||||
msgpack (1.7.5)
|
msgpack (1.7.5)
|
||||||
multi_json (1.15.0)
|
multi_json (1.15.0)
|
||||||
|
multipart-post (2.4.1)
|
||||||
neighbor (0.5.1)
|
neighbor (0.5.1)
|
||||||
activerecord (>= 7)
|
activerecord (>= 7)
|
||||||
|
net-http (0.6.0)
|
||||||
|
uri
|
||||||
net-imap (0.5.4)
|
net-imap (0.5.4)
|
||||||
date
|
date
|
||||||
net-protocol
|
net-protocol
|
||||||
@@ -625,6 +660,11 @@ GEM
|
|||||||
spoom (>= 1.2.0)
|
spoom (>= 1.2.0)
|
||||||
thor (>= 1.2.0)
|
thor (>= 1.2.0)
|
||||||
yard-sorbet
|
yard-sorbet
|
||||||
|
telegram-bot-ruby (2.4.0)
|
||||||
|
dry-struct (~> 1.6)
|
||||||
|
faraday (~> 2.0)
|
||||||
|
faraday-multipart (~> 1.0)
|
||||||
|
zeitwerk (~> 2.6)
|
||||||
thor (1.3.2)
|
thor (1.3.2)
|
||||||
thruster (0.1.11-aarch64-linux)
|
thruster (0.1.11-aarch64-linux)
|
||||||
thruster (0.1.11-arm64-darwin)
|
thruster (0.1.11-arm64-darwin)
|
||||||
@@ -638,6 +678,7 @@ GEM
|
|||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
unicode_plot (0.0.5)
|
unicode_plot (0.0.5)
|
||||||
enumerable-statistics (>= 2.0.1)
|
enumerable-statistics (>= 2.0.1)
|
||||||
|
uri (1.0.3)
|
||||||
useragent (0.16.11)
|
useragent (0.16.11)
|
||||||
warden (1.2.9)
|
warden (1.2.9)
|
||||||
rack (>= 2.0.9)
|
rack (>= 2.0.9)
|
||||||
@@ -759,6 +800,7 @@ DEPENDENCIES
|
|||||||
table_print
|
table_print
|
||||||
tailwindcss-rails (~> 3.0)
|
tailwindcss-rails (~> 3.0)
|
||||||
tapioca (= 0.16.6)
|
tapioca (= 0.16.6)
|
||||||
|
telegram-bot-ruby
|
||||||
thruster
|
thruster
|
||||||
timeout
|
timeout
|
||||||
turbo-rails
|
turbo-rails
|
||||||
|
|||||||
9
sorbet/rbi/gems/dry-core@1.1.0.rbi
generated
Normal file
9
sorbet/rbi/gems/dry-core@1.1.0.rbi
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `dry-core` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem dry-core`.
|
||||||
|
|
||||||
|
|
||||||
|
# THIS IS AN EMPTY RBI FILE.
|
||||||
|
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
||||||
9
sorbet/rbi/gems/dry-inflector@1.2.0.rbi
generated
Normal file
9
sorbet/rbi/gems/dry-inflector@1.2.0.rbi
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `dry-inflector` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem dry-inflector`.
|
||||||
|
|
||||||
|
|
||||||
|
# THIS IS AN EMPTY RBI FILE.
|
||||||
|
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
||||||
9
sorbet/rbi/gems/dry-logic@1.6.0.rbi
generated
Normal file
9
sorbet/rbi/gems/dry-logic@1.6.0.rbi
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `dry-logic` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem dry-logic`.
|
||||||
|
|
||||||
|
|
||||||
|
# THIS IS AN EMPTY RBI FILE.
|
||||||
|
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
||||||
925
sorbet/rbi/gems/dry-struct@1.8.0.rbi
generated
Normal file
925
sorbet/rbi/gems/dry-struct@1.8.0.rbi
generated
Normal file
@@ -0,0 +1,925 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `dry-struct` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem dry-struct`.
|
||||||
|
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#5
|
||||||
|
module Dry
|
||||||
|
class << self
|
||||||
|
# source://dry-core/1.1.0/lib/dry/core.rb#52
|
||||||
|
def Equalizer(*keys, **options); end
|
||||||
|
|
||||||
|
# Constructor method for easily creating a {Dry::Struct}.
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# require 'dry-struct'
|
||||||
|
#
|
||||||
|
# module Types
|
||||||
|
# include Dry.Types()
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# Person = Dry.Struct(name: Types::String, age: Types::Integer)
|
||||||
|
# matz = Person.new(name: "Matz", age: 52)
|
||||||
|
# matz.name #=> "Matz"
|
||||||
|
# matz.age #=> 52
|
||||||
|
#
|
||||||
|
# Test = Dry.Struct(expected: Types::String) { schema(schema.strict) }
|
||||||
|
# Test[expected: "foo", unexpected: "bar"]
|
||||||
|
# #=> Dry::Struct::Error: [Test.new] unexpected keys [:unexpected] in Hash input
|
||||||
|
# @return [Dry::Struct]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#30
|
||||||
|
def Struct(attributes = T.unsafe(nil), &block); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#253
|
||||||
|
def Types(*namespaces, default: T.unsafe(nil), **aliases); end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Typed {Struct} with virtus-like DSL for defining schema.
|
||||||
|
#
|
||||||
|
# ### Differences between dry-struct and virtus
|
||||||
|
#
|
||||||
|
# {Struct} look somewhat similar to [Virtus][] but there are few significant differences:
|
||||||
|
#
|
||||||
|
# * {Struct}s don't provide attribute writers and are meant to be used
|
||||||
|
# as "data objects" exclusively.
|
||||||
|
# * Handling of attribute values is provided by standalone type objects from
|
||||||
|
# [`dry-types`][].
|
||||||
|
# * Handling of attribute hashes is provided by standalone hash schemas from
|
||||||
|
# [`dry-types`][].
|
||||||
|
# * Struct classes quack like [`dry-types`][], which means you can use them
|
||||||
|
# in hash schemas, as array members or sum them
|
||||||
|
#
|
||||||
|
# {Struct} class can specify a constructor type, which uses [hash schemas][]
|
||||||
|
# to handle attributes in `.new` method.
|
||||||
|
#
|
||||||
|
# [`dry-types`]: https://github.com/dry-rb/dry-types
|
||||||
|
# [Virtus]: https://github.com/solnic/virtus
|
||||||
|
# [hash schemas]: http://dry-rb.org/gems/dry-types/hash-schemas
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# require 'dry-struct'
|
||||||
|
#
|
||||||
|
# module Types
|
||||||
|
# include Dry.Types()
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# class Book < Dry::Struct
|
||||||
|
# attribute :title, Types::String
|
||||||
|
# attribute :subtitle, Types::String.optional
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# rom_n_roda = Book.new(
|
||||||
|
# title: 'Web Development with ROM and Roda',
|
||||||
|
# subtitle: nil
|
||||||
|
# )
|
||||||
|
# rom_n_roda.title #=> 'Web Development with ROM and Roda'
|
||||||
|
# rom_n_roda.subtitle #=> nil
|
||||||
|
#
|
||||||
|
# refactoring = Book.new(
|
||||||
|
# title: 'Refactoring',
|
||||||
|
# subtitle: 'Improving the Design of Existing Code'
|
||||||
|
# )
|
||||||
|
# refactoring.title #=> 'Refactoring'
|
||||||
|
# refactoring.subtitle #=> 'Improving the Design of Existing Code'
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#6
|
||||||
|
class Dry::Struct
|
||||||
|
include ::Dry::Core::Constants
|
||||||
|
include ::Dry::Core::Equalizer::Methods
|
||||||
|
extend ::Dry::Core::Extensions
|
||||||
|
extend ::Dry::Core::Constants
|
||||||
|
extend ::Dry::Core::ClassAttributes
|
||||||
|
extend ::Dry::Types::Type
|
||||||
|
extend ::Dry::Types::Builder
|
||||||
|
extend ::Dry::Struct::ClassInterface
|
||||||
|
extend ::Dry::Core::Deprecations::Interface
|
||||||
|
|
||||||
|
# @param attributes [Hash, #each]
|
||||||
|
# @return [Struct] a new instance of Struct
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#126
|
||||||
|
def initialize(attributes); end
|
||||||
|
|
||||||
|
# Retrieves value of previously defined attribute by its' `name`
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# class Book < Dry::Struct
|
||||||
|
# attribute :title, Types::String
|
||||||
|
# attribute :subtitle, Types::String.optional
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# rom_n_roda = Book.new(
|
||||||
|
# title: 'Web Development with ROM and Roda',
|
||||||
|
# subtitle: nil
|
||||||
|
# )
|
||||||
|
# rom_n_roda[:title] #=> 'Web Development with ROM and Roda'
|
||||||
|
# rom_n_roda[:subtitle] #=> nil
|
||||||
|
# @param name [String]
|
||||||
|
# @return [Object]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#147
|
||||||
|
def [](name); end
|
||||||
|
|
||||||
|
# Returns the value of attribute attributes.
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#122
|
||||||
|
def __attributes__; end
|
||||||
|
|
||||||
|
# Create a copy of {Dry::Struct} with overriden attributes
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# class Book < Dry::Struct
|
||||||
|
# attribute :title, Types::String
|
||||||
|
# attribute :subtitle, Types::String.optional
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# rom_n_roda = Book.new(
|
||||||
|
# title: 'Web Development with ROM and Roda',
|
||||||
|
# subtitle: '2nd edition'
|
||||||
|
# )
|
||||||
|
# #=> #<Book title="Web Development with ROM and Roda" subtitle="2nd edition">
|
||||||
|
#
|
||||||
|
# rom_n_roda.new(subtitle: '3rd edition')
|
||||||
|
# #=> #<Book title="Web Development with ROM and Roda" subtitle="3rd edition">
|
||||||
|
# @param changeset [Hash{Symbol => Object}]
|
||||||
|
# @return [Struct]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#202
|
||||||
|
def __new__(changeset); end
|
||||||
|
|
||||||
|
# Returns the value of attribute attributes.
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#122
|
||||||
|
def attributes; end
|
||||||
|
|
||||||
|
# Pattern matching support
|
||||||
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#224
|
||||||
|
def deconstruct_keys(_keys); end
|
||||||
|
|
||||||
|
# @return [String]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#215
|
||||||
|
def inspect; end
|
||||||
|
|
||||||
|
# Create a copy of {Dry::Struct} with overriden attributes
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# class Book < Dry::Struct
|
||||||
|
# attribute :title, Types::String
|
||||||
|
# attribute :subtitle, Types::String.optional
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# rom_n_roda = Book.new(
|
||||||
|
# title: 'Web Development with ROM and Roda',
|
||||||
|
# subtitle: '2nd edition'
|
||||||
|
# )
|
||||||
|
# #=> #<Book title="Web Development with ROM and Roda" subtitle="2nd edition">
|
||||||
|
#
|
||||||
|
# rom_n_roda.new(subtitle: '3rd edition')
|
||||||
|
# #=> #<Book title="Web Development with ROM and Roda" subtitle="3rd edition">
|
||||||
|
# @param changeset [Hash{Symbol => Object}]
|
||||||
|
# @return [Struct]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#202
|
||||||
|
def new(changeset); end
|
||||||
|
|
||||||
|
# Converts the {Dry::Struct} to a hash with keys representing
|
||||||
|
# each attribute (as symbols) and their corresponding values
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# class Book < Dry::Struct
|
||||||
|
# attribute :title, Types::String
|
||||||
|
# attribute :subtitle, Types::String.optional
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# rom_n_roda = Book.new(
|
||||||
|
# title: 'Web Development with ROM and Roda',
|
||||||
|
# subtitle: nil
|
||||||
|
# )
|
||||||
|
# rom_n_roda.to_hash
|
||||||
|
# #=> {title: 'Web Development with ROM and Roda', subtitle: nil}
|
||||||
|
# @return [Hash{Symbol => Object}]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#174
|
||||||
|
def to_h; end
|
||||||
|
|
||||||
|
# Converts the {Dry::Struct} to a hash with keys representing
|
||||||
|
# each attribute (as symbols) and their corresponding values
|
||||||
|
# TODO: remove in 2.0
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# class Book < Dry::Struct
|
||||||
|
# attribute :title, Types::String
|
||||||
|
# attribute :subtitle, Types::String.optional
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# rom_n_roda = Book.new(
|
||||||
|
# title: 'Web Development with ROM and Roda',
|
||||||
|
# subtitle: nil
|
||||||
|
# )
|
||||||
|
# rom_n_roda.to_hash
|
||||||
|
# #=> {title: 'Web Development with ROM and Roda', subtitle: nil}
|
||||||
|
# @return [Hash{Symbol => Object}]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#174
|
||||||
|
def to_hash; end
|
||||||
|
|
||||||
|
class << self
|
||||||
|
# source://dry-struct//lib/dry/struct.rb#94
|
||||||
|
def loader; end
|
||||||
|
|
||||||
|
def prepend(*_arg0); end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Class-level interface of {Struct} and {Value}
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#8
|
||||||
|
module Dry::Struct::ClassInterface
|
||||||
|
include ::Dry::Core::Constants
|
||||||
|
include ::Dry::Core::ClassAttributes
|
||||||
|
include ::Dry::Types::Type
|
||||||
|
include ::Dry::Types::Builder
|
||||||
|
|
||||||
|
# @param other [Object, Dry::Struct]
|
||||||
|
# @return [Boolean]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#331
|
||||||
|
def ===(other); end
|
||||||
|
|
||||||
|
# Make the struct abstract. This class will be used as a default
|
||||||
|
# parent class for nested structs
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#387
|
||||||
|
def abstract; end
|
||||||
|
|
||||||
|
# Adds an attribute for this {Struct} with given `name` and `type`
|
||||||
|
# and modifies {.schema} accordingly.
|
||||||
|
#
|
||||||
|
# @example with nested structs
|
||||||
|
# class Language < Dry::Struct
|
||||||
|
# attribute :name, Types::String
|
||||||
|
# attribute :details, Dry::Struct do
|
||||||
|
# attribute :type, Types::String
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# Language.schema # new lines for readability
|
||||||
|
# # => #<Dry::Types[
|
||||||
|
# Constructor<Schema<keys={
|
||||||
|
# name: Constrained<Nominal<String> rule=[type?(String)]>
|
||||||
|
# details: Language::Details
|
||||||
|
# }> fn=Kernel.Hash>]>
|
||||||
|
#
|
||||||
|
# ruby = Language.new(name: 'Ruby', details: { type: 'OO' })
|
||||||
|
# ruby.name #=> 'Ruby'
|
||||||
|
# ruby.details #=> #<Language::Details type="OO">
|
||||||
|
# ruby.details.type #=> 'OO'
|
||||||
|
# @example with a nested array of structs
|
||||||
|
# class Language < Dry::Struct
|
||||||
|
# attribute :name, Types::String
|
||||||
|
# attribute :versions, Types::Array.of(Types::String)
|
||||||
|
# attribute :celebrities, Types::Array.of(Dry::Struct) do
|
||||||
|
# attribute :name, Types::String
|
||||||
|
# attribute :pseudonym, Types::String
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# Language.schema # new lines for readability
|
||||||
|
# => #<Dry::Types[Constructor<Schema<keys={
|
||||||
|
# name: Constrained<Nominal<String> rule=[type?(String)]>
|
||||||
|
# versions: Constrained<
|
||||||
|
# Array<Constrained<Nominal<String> rule=[type?(String)]>
|
||||||
|
# > rule=[type?(Array)]>
|
||||||
|
# celebrities: Constrained<Array<Language::Celebrity> rule=[type?(Array)]>
|
||||||
|
# }> fn=Kernel.Hash>]>
|
||||||
|
#
|
||||||
|
# ruby = Language.new(
|
||||||
|
# name: 'Ruby',
|
||||||
|
# versions: %w(1.8.7 1.9.8 2.0.1),
|
||||||
|
# celebrities: [
|
||||||
|
# { name: 'Yukihiro Matsumoto', pseudonym: 'Matz' },
|
||||||
|
# { name: 'Aaron Patterson', pseudonym: 'tenderlove' }
|
||||||
|
# ]
|
||||||
|
# )
|
||||||
|
# ruby.name #=> 'Ruby'
|
||||||
|
# ruby.versions #=> ['1.8.7', '1.9.8', '2.0.1']
|
||||||
|
# ruby.celebrities
|
||||||
|
# #=> [
|
||||||
|
# #<Language::Celebrity name='Yukihiro Matsumoto' pseudonym='Matz'>,
|
||||||
|
# #<Language::Celebrity name='Aaron Patterson' pseudonym='tenderlove'>
|
||||||
|
# ]
|
||||||
|
# ruby.celebrities[0].name #=> 'Yukihiro Matsumoto'
|
||||||
|
# ruby.celebrities[0].pseudonym #=> 'Matz'
|
||||||
|
# ruby.celebrities[1].name #=> 'Aaron Patterson'
|
||||||
|
# ruby.celebrities[1].pseudonym #=> 'tenderlove'
|
||||||
|
# @param name [Symbol] name of the defined attribute
|
||||||
|
# @param type [Dry::Types::Type, nil] or superclass of nested type
|
||||||
|
# @raise [RepeatedAttributeError] when trying to define attribute with the
|
||||||
|
# same name as previously defined one
|
||||||
|
# @return [Dry::Struct]
|
||||||
|
# @yield If a block is given, it will be evaluated in the context of
|
||||||
|
# a new struct class, and set as a nested type for the given
|
||||||
|
# attribute. A class with a matching name will also be defined for
|
||||||
|
# the nested type.
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#86
|
||||||
|
def attribute(name, type = T.unsafe(nil), &_arg2); end
|
||||||
|
|
||||||
|
# Adds an omittable (key is not required on initialization) attribute for this {Struct}
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# class User < Dry::Struct
|
||||||
|
# attribute :name, Types::String
|
||||||
|
# attribute? :email, Types::String
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# User.new(name: 'John') # => #<User name="John" email=nil>
|
||||||
|
# @param name [Symbol] name of the defined attribute
|
||||||
|
# @param type [Dry::Types::Type, nil] or superclass of nested type
|
||||||
|
# @return [Dry::Struct]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#139
|
||||||
|
def attribute?(*args, &_arg1); end
|
||||||
|
|
||||||
|
# Gets the list of attribute names
|
||||||
|
#
|
||||||
|
# @return [Array<Symbol>]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#357
|
||||||
|
def attribute_names; end
|
||||||
|
|
||||||
|
# @example
|
||||||
|
# class Book < Dry::Struct
|
||||||
|
# attributes(
|
||||||
|
# title: Types::String,
|
||||||
|
# author: Types::String
|
||||||
|
# )
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# Book.schema
|
||||||
|
# # => #<Dry::Types[Constructor<Schema<keys={
|
||||||
|
# # title: Constrained<Nominal<String> rule=[type?(String)]>
|
||||||
|
# # author: Constrained<Nominal<String> rule=[type?(String)]>
|
||||||
|
# # }> fn=Kernel.Hash>]>
|
||||||
|
# @param new_schema [Hash{Symbol => Dry::Types::Type}]
|
||||||
|
# @raise [RepeatedAttributeError] when trying to define attribute with the
|
||||||
|
# same name as previously defined one
|
||||||
|
# @return [Dry::Struct]
|
||||||
|
# @see #attribute
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#173
|
||||||
|
def attributes(new_schema); end
|
||||||
|
|
||||||
|
# Add atributes from another struct
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# class Address < Dry::Struct
|
||||||
|
# attribute :city, Types::String
|
||||||
|
# attribute :country, Types::String
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# class User < Dry::Struct
|
||||||
|
# attribute :name, Types::String
|
||||||
|
# attributes_from Address
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# User.new(name: 'Quispe', city: 'La Paz', country: 'Bolivia')
|
||||||
|
# @example with nested structs
|
||||||
|
# class User < Dry::Struct
|
||||||
|
# attribute :name, Types::String
|
||||||
|
# attribute :address do
|
||||||
|
# attributes_from Address
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# @param struct [Dry::Struct]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#114
|
||||||
|
def attributes_from(struct); end
|
||||||
|
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#261
|
||||||
|
def call_safe(input, &_arg1); end
|
||||||
|
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#270
|
||||||
|
def call_unsafe(input); end
|
||||||
|
|
||||||
|
# @return [true]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#335
|
||||||
|
def constrained?; end
|
||||||
|
|
||||||
|
# @param constructor [#call, nil]
|
||||||
|
# @param block [#call, nil]
|
||||||
|
# @return [Dry::Struct::Constructor]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#288
|
||||||
|
def constructor(constructor = T.unsafe(nil), **_arg1, &block); end
|
||||||
|
|
||||||
|
# @return [false]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#327
|
||||||
|
def default?; end
|
||||||
|
|
||||||
|
# @param args [({Symbol => Object})]
|
||||||
|
# @return [Dry::Types::Result::Failure]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#320
|
||||||
|
def failure(*args); end
|
||||||
|
|
||||||
|
# Checks if this {Struct} has the given attribute
|
||||||
|
#
|
||||||
|
# @param key [Symbol] Attribute name
|
||||||
|
# @return [Boolean]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#352
|
||||||
|
def has_attribute?(key); end
|
||||||
|
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#279
|
||||||
|
def load(attributes); end
|
||||||
|
|
||||||
|
# @return [{Symbol => Object}]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#362
|
||||||
|
def meta(meta = T.unsafe(nil)); end
|
||||||
|
|
||||||
|
# @param attributes [Hash{Symbol => Object}, Dry::Struct]
|
||||||
|
# @raise [Struct::Error] if the given attributes don't conform {#schema}
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#239
|
||||||
|
def new(attributes = T.unsafe(nil), safe = T.unsafe(nil), &_arg2); end
|
||||||
|
|
||||||
|
# @return [false]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#341
|
||||||
|
def optional?; end
|
||||||
|
|
||||||
|
# @return [self]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#338
|
||||||
|
def primitive; end
|
||||||
|
|
||||||
|
# @param other [Object, Dry::Struct]
|
||||||
|
# @return [Boolean]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#331
|
||||||
|
def primitive?(other); end
|
||||||
|
|
||||||
|
# @param klass [Class]
|
||||||
|
# @param args [({Symbol => Object})]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#324
|
||||||
|
def result(klass, *args); end
|
||||||
|
|
||||||
|
# @param args [({Symbol => Object})]
|
||||||
|
# @return [Dry::Types::Result::Success]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#316
|
||||||
|
def success(*args); end
|
||||||
|
|
||||||
|
# Dump to the AST
|
||||||
|
#
|
||||||
|
# @api public
|
||||||
|
# @return [Array]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#396
|
||||||
|
def to_ast(meta: T.unsafe(nil)); end
|
||||||
|
|
||||||
|
# @return [Proc]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#344
|
||||||
|
def to_proc; end
|
||||||
|
|
||||||
|
# Add an arbitrary transformation for input hash keys.
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# class Book < Dry::Struct
|
||||||
|
# transform_keys(&:to_sym)
|
||||||
|
#
|
||||||
|
# attribute :title, Types::String
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# Book.new('title' => "The Old Man and the Sea")
|
||||||
|
# # => #<Book title="The Old Man and the Sea">
|
||||||
|
# @param proc [#call, nil]
|
||||||
|
# @param block [#call, nil]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#221
|
||||||
|
def transform_keys(proc = T.unsafe(nil), &block); end
|
||||||
|
|
||||||
|
# Add an arbitrary transformation for new attribute types.
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# class Book < Dry::Struct
|
||||||
|
# transform_types { |t| t.meta(struct: :Book) }
|
||||||
|
#
|
||||||
|
# attribute :title, Types::String
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# Book.schema.key(:title).meta # => { struct: :Book }
|
||||||
|
# @param proc [#call, nil]
|
||||||
|
# @param block [#call, nil]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#204
|
||||||
|
def transform_types(proc = T.unsafe(nil), &block); end
|
||||||
|
|
||||||
|
# @param input [Hash{Symbol => Object}, Dry::Struct]
|
||||||
|
# @return [Dry::Types::Result]
|
||||||
|
# @yieldparam failure [Dry::Types::Result::Failure]
|
||||||
|
# @yieldreturn [Dry::Types::Result]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#296
|
||||||
|
def try(input); end
|
||||||
|
|
||||||
|
# @param input [Hash{Symbol => Object}, Dry::Struct]
|
||||||
|
# @private
|
||||||
|
# @return [Dry::Types::Result]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#306
|
||||||
|
def try_struct(input); end
|
||||||
|
|
||||||
|
# Build a sum type
|
||||||
|
#
|
||||||
|
# @param type [Dry::Types::Type]
|
||||||
|
# @return [Dry::Types::Sum]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#377
|
||||||
|
def |(type); end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
# Constructs a type
|
||||||
|
#
|
||||||
|
# @return [Dry::Types::Type, Dry::Struct]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#430
|
||||||
|
def build_type(name, type = T.unsafe(nil), &_arg2); end
|
||||||
|
|
||||||
|
# @param new_keys [Hash{Symbol => Dry::Types::Type, Dry::Struct}]
|
||||||
|
# @raise [RepeatedAttributeError] when trying to define attribute with the
|
||||||
|
# same name as previously defined one
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#228
|
||||||
|
def check_schema_duplication(new_keys); end
|
||||||
|
|
||||||
|
# Retrieves default attributes from defined {.schema}.
|
||||||
|
# Used in a {Struct} constructor if no attributes provided to {.new}
|
||||||
|
#
|
||||||
|
# @return [Hash{Symbol => Object}]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#411
|
||||||
|
def default_attributes(default_schema = T.unsafe(nil)); end
|
||||||
|
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#452
|
||||||
|
def define_accessors(keys); end
|
||||||
|
|
||||||
|
# Checks if the given type is a Dry::Struct
|
||||||
|
#
|
||||||
|
# @param type [Dry::Types::Type]
|
||||||
|
# @return [Boolean]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#422
|
||||||
|
def struct?(type); end
|
||||||
|
|
||||||
|
# Stores an object for building nested struct classes
|
||||||
|
#
|
||||||
|
# @return [StructBuilder]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#402
|
||||||
|
def struct_builder; end
|
||||||
|
|
||||||
|
# @api private
|
||||||
|
# @return [Boolean]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/class_interface.rb#468
|
||||||
|
def valid_method_name?(key); end
|
||||||
|
end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/compiler.rb#5
|
||||||
|
class Dry::Struct::Compiler < ::Dry::Types::Compiler
|
||||||
|
# source://dry-struct//lib/dry/struct/compiler.rb#6
|
||||||
|
def visit_struct(node); end
|
||||||
|
end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/constructor.rb#5
|
||||||
|
class Dry::Struct::Constructor < ::Dry::Types::Constructor
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/constructor.rb#16
|
||||||
|
def primitive; end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Raised when given input doesn't conform schema and constructor type
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/errors.rb#6
|
||||||
|
class Dry::Struct::Error < ::Dry::Types::CoercionError; end
|
||||||
|
|
||||||
|
# Helper for {Struct#to_hash} implementation
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/hashify.rb#6
|
||||||
|
module Dry::Struct::Hashify
|
||||||
|
class << self
|
||||||
|
# Converts value to hash recursively
|
||||||
|
#
|
||||||
|
# @param value [#to_hash, #map, Object]
|
||||||
|
# @return [Hash, Array]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/hashify.rb#10
|
||||||
|
def [](value); end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Raised when a struct doesn't have an attribute
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/errors.rb#18
|
||||||
|
class Dry::Struct::MissingAttributeError < ::KeyError
|
||||||
|
# @return [MissingAttributeError] a new instance of MissingAttributeError
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/errors.rb#19
|
||||||
|
def initialize(attribute:, klass:); end
|
||||||
|
end
|
||||||
|
|
||||||
|
# When struct class stored in ast was garbage collected because no alive objects exists
|
||||||
|
# This shouldn't happen in a working application
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/errors.rb#26
|
||||||
|
class Dry::Struct::RecycledStructError < ::RuntimeError
|
||||||
|
# @return [RecycledStructError] a new instance of RecycledStructError
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/errors.rb#27
|
||||||
|
def initialize; end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Raised when defining duplicate attributes
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/errors.rb#9
|
||||||
|
class Dry::Struct::RepeatedAttributeError < ::ArgumentError
|
||||||
|
# @param key [Symbol] attribute name that is the same as previously defined one
|
||||||
|
# @return [RepeatedAttributeError] a new instance of RepeatedAttributeError
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/errors.rb#12
|
||||||
|
def initialize(key); end
|
||||||
|
end
|
||||||
|
|
||||||
|
# @private
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#6
|
||||||
|
class Dry::Struct::StructBuilder < ::Dry::Struct::Compiler
|
||||||
|
# @return [StructBuilder] a new instance of StructBuilder
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#9
|
||||||
|
def initialize(struct); end
|
||||||
|
|
||||||
|
# @param attr_name [Symbol|String] the name of the nested type
|
||||||
|
# @param type [Dry::Struct, Dry::Types::Type::Array, Undefined] the superclass
|
||||||
|
# of the nested struct
|
||||||
|
# @yield the body of the nested struct
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#18
|
||||||
|
def call(attr_name, type, &block); end
|
||||||
|
|
||||||
|
# Returns the value of attribute struct.
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#7
|
||||||
|
def struct; end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
# @return [Boolean]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#48
|
||||||
|
def array?(type); end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#75
|
||||||
|
def check_name(name); end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#64
|
||||||
|
def const_name(type, attr_name); end
|
||||||
|
|
||||||
|
# @return [Boolean]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#52
|
||||||
|
def optional?(type); end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#54
|
||||||
|
def parent(type); end
|
||||||
|
|
||||||
|
# @return [Boolean]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#46
|
||||||
|
def type?(type); end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#89
|
||||||
|
def visit_array(node); end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#84
|
||||||
|
def visit_constrained(node); end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#96
|
||||||
|
def visit_constructor(node); end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/struct_builder.rb#94
|
||||||
|
def visit_nominal(*_arg0); end
|
||||||
|
end
|
||||||
|
|
||||||
|
# A sum type of two or more structs
|
||||||
|
# As opposed to Dry::Types::Sum::Constrained
|
||||||
|
# this type tries no to coerce data first.
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/sum.rb#8
|
||||||
|
class Dry::Struct::Sum < ::Dry::Types::Sum::Constrained
|
||||||
|
# @return [boolean]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/sum.rb#39
|
||||||
|
def ===(value); end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/sum.rb#9
|
||||||
|
def call(input); end
|
||||||
|
|
||||||
|
# @param input [Hash{Symbol => Object}, Dry::Struct]
|
||||||
|
# @return [Dry::Types::Result]
|
||||||
|
# @yieldparam failure [Dry::Types::Result::Failure]
|
||||||
|
# @yieldreturn [Dry::Types::Result]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/sum.rb#19
|
||||||
|
def try(input); end
|
||||||
|
|
||||||
|
# Build a new sum type
|
||||||
|
#
|
||||||
|
# @param type [Dry::Types::Type]
|
||||||
|
# @return [Dry::Types::Sum]
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/sum.rb#30
|
||||||
|
def |(type); end
|
||||||
|
|
||||||
|
protected
|
||||||
|
|
||||||
|
# @private
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/sum.rb#44
|
||||||
|
def try_struct(input, &block); end
|
||||||
|
end
|
||||||
|
|
||||||
|
# @private
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/version.rb#6
|
||||||
|
Dry::Struct::VERSION = T.let(T.unsafe(nil), String)
|
||||||
|
|
||||||
|
# {Value} objects behave like {Struct}s but *deeply frozen*
|
||||||
|
# using [`ice_nine`](https://github.com/dkubb/ice_nine)
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# class Location < Dry::Struct::Value
|
||||||
|
# attribute :lat, Types::Float
|
||||||
|
# attribute :lng, Types::Float
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# loc1 = Location.new(lat: 1.23, lng: 4.56)
|
||||||
|
# loc2 = Location.new(lat: 1.23, lng: 4.56)
|
||||||
|
#
|
||||||
|
# loc1.frozen? #=> true
|
||||||
|
# loc2.frozen? #=> true
|
||||||
|
# loc1 == loc2 #=> true
|
||||||
|
# @see https://github.com/dkubb/ice_nine
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/value.rb#26
|
||||||
|
class Dry::Struct::Value < ::Dry::Struct
|
||||||
|
class << self
|
||||||
|
# @param attributes [Hash{Symbol => Object}, Dry::Struct]
|
||||||
|
# @return [Value]
|
||||||
|
# @see https://github.com/dkubb/ice_nine
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/value.rb#32
|
||||||
|
def new(*_arg0); end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# source://dry-struct//lib/dry/struct/printer.rb#6
|
||||||
|
module Dry::Types
|
||||||
|
extend ::Dry::Core::Constants
|
||||||
|
|
||||||
|
class << self
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/constraints.rb#13
|
||||||
|
def Rule(options); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#115
|
||||||
|
def [](name); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#163
|
||||||
|
def const_missing(const); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#82
|
||||||
|
def container; end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#197
|
||||||
|
def define_builder(method, &block); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#149
|
||||||
|
def identifier(klass); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#73
|
||||||
|
def included(*_arg0); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#33
|
||||||
|
def loader; end
|
||||||
|
|
||||||
|
# source://dry-core/1.1.0/lib/dry/core/deprecations.rb#202
|
||||||
|
def module(*args, &block); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#104
|
||||||
|
def register(name, type = T.unsafe(nil), &block); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#91
|
||||||
|
def registered?(class_or_identifier); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/constraints.rb#26
|
||||||
|
def rule_compiler; end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types.rb#158
|
||||||
|
def type_map; end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/printer.rb#8
|
||||||
|
class Dry::Types::Printer
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#38
|
||||||
|
def initialize; end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#43
|
||||||
|
def call(type); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#49
|
||||||
|
def visit(type, &_arg1); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#62
|
||||||
|
def visit_any(_); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#64
|
||||||
|
def visit_array(type); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#70
|
||||||
|
def visit_array_member(array); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#152
|
||||||
|
def visit_callable(callable); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#102
|
||||||
|
def visit_composition(composition, &_arg1); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#91
|
||||||
|
def visit_constrained(constrained); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#78
|
||||||
|
def visit_constructor(constructor); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#126
|
||||||
|
def visit_default(default); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#108
|
||||||
|
def visit_enum(enum); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#250
|
||||||
|
def visit_hash(hash); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#240
|
||||||
|
def visit_key(key); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#146
|
||||||
|
def visit_lax(lax); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#226
|
||||||
|
def visit_map(map); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#140
|
||||||
|
def visit_nominal(type); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#269
|
||||||
|
def visit_options(options, meta = T.unsafe(nil)); end
|
||||||
|
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#187
|
||||||
|
def visit_schema(schema); end
|
||||||
|
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
# source://dry-types/1.8.3/lib/dry/types/printer.rb#78
|
||||||
|
def visit_struct_constructor(constructor); end
|
||||||
|
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
# source://dry-struct//lib/dry/struct/printer.rb#12
|
||||||
|
def visit_struct_sum(sum); end
|
||||||
|
end
|
||||||
3971
sorbet/rbi/gems/dry-types@1.8.3.rbi
generated
Normal file
3971
sorbet/rbi/gems/dry-types@1.8.3.rbi
generated
Normal file
File diff suppressed because it is too large
Load Diff
9
sorbet/rbi/gems/faraday-multipart@1.1.1.rbi
generated
Normal file
9
sorbet/rbi/gems/faraday-multipart@1.1.1.rbi
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `faraday-multipart` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem faraday-multipart`.
|
||||||
|
|
||||||
|
|
||||||
|
# THIS IS AN EMPTY RBI FILE.
|
||||||
|
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
||||||
9
sorbet/rbi/gems/faraday-net_http@3.4.1.rbi
generated
Normal file
9
sorbet/rbi/gems/faraday-net_http@3.4.1.rbi
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `faraday-net_http` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem faraday-net_http`.
|
||||||
|
|
||||||
|
|
||||||
|
# THIS IS AN EMPTY RBI FILE.
|
||||||
|
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
||||||
9
sorbet/rbi/gems/faraday@2.13.4.rbi
generated
Normal file
9
sorbet/rbi/gems/faraday@2.13.4.rbi
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `faraday` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem faraday`.
|
||||||
|
|
||||||
|
|
||||||
|
# THIS IS AN EMPTY RBI FILE.
|
||||||
|
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
||||||
9
sorbet/rbi/gems/ice_nine@0.11.2.rbi
generated
Normal file
9
sorbet/rbi/gems/ice_nine@0.11.2.rbi
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `ice_nine` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem ice_nine`.
|
||||||
|
|
||||||
|
|
||||||
|
# THIS IS AN EMPTY RBI FILE.
|
||||||
|
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
||||||
2032
sorbet/rbi/gems/json@2.13.2.rbi
generated
Normal file
2032
sorbet/rbi/gems/json@2.13.2.rbi
generated
Normal file
File diff suppressed because it is too large
Load Diff
9
sorbet/rbi/gems/multipart-post@2.4.1.rbi
generated
Normal file
9
sorbet/rbi/gems/multipart-post@2.4.1.rbi
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# typed: true
|
||||||
|
|
||||||
|
# DO NOT EDIT MANUALLY
|
||||||
|
# This is an autogenerated file for types exported from the `multipart-post` gem.
|
||||||
|
# Please instead update this file by running `bin/tapioca gem multipart-post`.
|
||||||
|
|
||||||
|
|
||||||
|
# THIS IS AN EMPTY RBI FILE.
|
||||||
|
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
||||||
4096
sorbet/rbi/gems/net-http@0.6.0.rbi
generated
Normal file
4096
sorbet/rbi/gems/net-http@0.6.0.rbi
generated
Normal file
File diff suppressed because it is too large
Load Diff
4716
sorbet/rbi/gems/telegram-bot-ruby@2.4.0.rbi
generated
Normal file
4716
sorbet/rbi/gems/telegram-bot-ruby@2.4.0.rbi
generated
Normal file
File diff suppressed because it is too large
Load Diff
2426
sorbet/rbi/gems/uri@1.0.3.rbi
generated
Normal file
2426
sorbet/rbi/gems/uri@1.0.3.rbi
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,17 @@
|
|||||||
|
|
||||||
module ::MakeMakefile; end
|
module ::MakeMakefile; end
|
||||||
module ::Spring; end
|
module ::Spring; end
|
||||||
|
module Dry::Core::Cache; end
|
||||||
|
module Dry::Core::Cache::Methods; end
|
||||||
|
module Dry::Core::ClassAttributes; end
|
||||||
|
module Dry::Core::Constants; end
|
||||||
|
module Dry::Core::Container::Configuration; end
|
||||||
|
module Dry::Core::Container::Mixin; end
|
||||||
|
module Dry::Core::Container::Mixin::Initializer; end
|
||||||
|
module Dry::Core::Deprecations::Interface; end
|
||||||
|
module Dry::Core::Equalizer::Methods; end
|
||||||
|
module Dry::Core::Extensions; end
|
||||||
|
module Dry::Inflector; end
|
||||||
module SyntaxTree::Haml; end
|
module SyntaxTree::Haml; end
|
||||||
module SyntaxTree::Haml::Format::Formatter; end
|
module SyntaxTree::Haml::Format::Formatter; end
|
||||||
module SyntaxTree::RBS; end
|
module SyntaxTree::RBS; end
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ require "sorbet-runtime"
|
|||||||
require "syntax_tree"
|
require "syntax_tree"
|
||||||
require "timeout"
|
require "timeout"
|
||||||
require "rake/dsl_definition"
|
require "rake/dsl_definition"
|
||||||
|
require "dry-types"
|
||||||
|
require "dry-struct"
|
||||||
|
require "dry/core"
|
||||||
|
require "dry/types"
|
||||||
|
require "telegram/bot"
|
||||||
|
|
||||||
require "prometheus_exporter/client"
|
require "prometheus_exporter/client"
|
||||||
require "prometheus_exporter/metric"
|
require "prometheus_exporter/metric"
|
||||||
|
|||||||
Reference in New Issue
Block a user