aboutsummaryrefslogtreecommitdiff
path: root/tools/ruby-tools/sorbet/rbi/gems/netrc@0.11.0.rbi
blob: 4ae989b9b2489c9e12c57c4183b3174f699dc7f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# typed: true

# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `netrc` gem.
# Please instead update this file by running `bin/tapioca gem netrc`.


# source://netrc//lib/netrc.rb#3
class Netrc
  # @return [Netrc] a new instance of Netrc
  #
  # source://netrc//lib/netrc.rb#166
  def initialize(path, data); end

  # source://netrc//lib/netrc.rb#180
  def [](k); end

  # source://netrc//lib/netrc.rb#188
  def []=(k, info); end

  # source://netrc//lib/netrc.rb#200
  def delete(key); end

  # source://netrc//lib/netrc.rb#211
  def each(&block); end

  # source://netrc//lib/netrc.rb#196
  def length; end

  # source://netrc//lib/netrc.rb#215
  def new_item(m, l, p); end

  # Returns the value of attribute new_item_prefix.
  #
  # source://netrc//lib/netrc.rb#178
  def new_item_prefix; end

  # Sets the attribute new_item_prefix
  #
  # @param value the value to set the attribute new_item_prefix to.
  #
  # source://netrc//lib/netrc.rb#178
  def new_item_prefix=(_arg0); end

  # source://netrc//lib/netrc.rb#219
  def save; end

  # source://netrc//lib/netrc.rb#233
  def unparse; end

  class << self
    # source://netrc//lib/netrc.rb#42
    def check_permissions(path); end

    # source://netrc//lib/netrc.rb#33
    def config; end

    # @yield [self.config]
    #
    # source://netrc//lib/netrc.rb#37
    def configure; end

    # source://netrc//lib/netrc.rb#10
    def default_path; end

    # source://netrc//lib/netrc.rb#14
    def home_path; end

    # source://netrc//lib/netrc.rb#85
    def lex(lines); end

    # source://netrc//lib/netrc.rb#29
    def netrc_filename; end

    # Returns two values, a header and a list of items.
    # Each item is a tuple, containing some or all of:
    # - machine keyword (including trailing whitespace+comments)
    # - machine name
    # - login keyword (including surrounding whitespace+comments)
    # - login
    # - password keyword (including surrounding whitespace+comments)
    # - password
    # - trailing chars
    # This lets us change individual fields, then write out the file
    # with all its original formatting.
    #
    # source://netrc//lib/netrc.rb#129
    def parse(ts); end

    # Reads path and parses it as a .netrc file. If path doesn't
    # exist, returns an empty object. Decrypt paths ending in .gpg.
    #
    # source://netrc//lib/netrc.rb#51
    def read(path = T.unsafe(nil)); end

    # @return [Boolean]
    #
    # source://netrc//lib/netrc.rb#112
    def skip?(s); end
  end
end

# source://netrc//lib/netrc.rb#8
Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped)

# source://netrc//lib/netrc.rb#244
class Netrc::Entry < ::Struct
  # Returns the value of attribute login
  #
  # @return [Object] the current value of login
  def login; end

  # Sets the attribute login
  #
  # @param value [Object] the value to set the attribute login to.
  # @return [Object] the newly set value
  def login=(_); end

  # Returns the value of attribute password
  #
  # @return [Object] the current value of password
  def password; end

  # Sets the attribute password
  #
  # @param value [Object] the value to set the attribute password to.
  # @return [Object] the newly set value
  def password=(_); end

  def to_ary; end

  class << self
    def [](*_arg0); end
    def inspect; end
    def keyword_init?; end
    def members; end
    def new(*_arg0); end
  end
end

# source://netrc//lib/netrc.rb#250
class Netrc::Error < ::StandardError; end

# source://netrc//lib/netrc.rb#68
class Netrc::TokenArray < ::Array
  # source://netrc//lib/netrc.rb#76
  def readto; end

  # source://netrc//lib/netrc.rb#69
  def take; end
end

# source://netrc//lib/netrc.rb#4
Netrc::VERSION = T.let(T.unsafe(nil), String)

# see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows
#
# source://netrc//lib/netrc.rb#7
Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped)