Class: BetterAuth::Endpoint::Result::SetCookieHeader

Inherits:
Array
  • Object
show all
Defined in:
lib/better_auth/endpoint.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from(value) ⇒ Object



212
213
214
# File 'lib/better_auth/endpoint.rb', line 212

def self.from(value)
  new(value.lines.map(&:chomp))
end

Instance Method Details

#=~(pattern) ⇒ Object



230
231
232
# File 'lib/better_auth/endpoint.rb', line 230

def =~(pattern)
  to_s =~ pattern
end

#include?(value) ⇒ Boolean

Returns:

  • (Boolean)


216
217
218
219
220
# File 'lib/better_auth/endpoint.rb', line 216

def include?(value)
  return super unless value.is_a?(String)

  any? { |line| line.include?(value) }
end

#linesObject



222
223
224
# File 'lib/better_auth/endpoint.rb', line 222

def lines
  self
end

#matchObject



226
227
228
# File 'lib/better_auth/endpoint.rb', line 226

def match(...)
  to_s.match(...)
end

#splitObject



234
235
236
# File 'lib/better_auth/endpoint.rb', line 234

def split(...)
  to_s.split(...)
end

#to_sObject



238
239
240
# File 'lib/better_auth/endpoint.rb', line 238

def to_s
  join("\n")
end

#to_strObject



242
243
244
# File 'lib/better_auth/endpoint.rb', line 242

def to_str
  to_s
end