Results for: "remove_const"

Takes file, a String with the location of a Ruby source file, reads, parses and compiles the file, and returns iseq, the compiled InstructionSequence with source location metadata set.

Optionally takes options, which can be true, false or a Hash, to modify the default behavior of the Ruby iseq compiler.

For details regarding valid compile options see ::compile_option=.

# /tmp/hello.rb
puts "Hello, world!"

# elsewhere
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb")
#=> <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>

Take a location from the prism parser and set the necessary instance variables.

Posts data to a host; returns a Net::HTTPResponse object.

Argument url must be a URI; argument data must be a hash:

_uri = uri.dup
_uri.path = '/posts'
data = {title: 'foo', body: 'bar', userId: 1}
res = Net::HTTP.post_form(_uri, data) # => #<Net::HTTPCreated 201 Created readbody=true>
puts res.body

Output:

{
  "title": "foo",
  "body": "bar",
  "userId": "1",
  "id": 101
}
No documentation available
No documentation available
No documentation available

Posts data to a host; returns a Net::HTTPResponse object.

Argument url must be a URI; argument data must be a hash:

_uri = uri.dup
_uri.path = '/posts'
data = {title: 'foo', body: 'bar', userId: 1}
res = Net::HTTP.post_form(_uri, data) # => #<Net::HTTPCreated 201 Created readbody=true>
puts res.body

Output:

{
  "title": "foo",
  "body": "bar",
  "userId": "1",
  "id": 101
}
No documentation available
No documentation available
No documentation available
No documentation available

Sets the encoding that should be used when reading the body:

Examples:

http = Net::HTTP.new(hostname)
req = Net::HTTP::Get.new('/')

http.request(req) do |res|
  p res.body.encoding # => #<Encoding:ASCII-8BIT>
end

http.request(req) do |res|
  res.body_encoding = "UTF-8"
  p res.body.encoding # => #<Encoding:UTF-8>
end

Validates typecode v, returns true or false.

Private setter for the typecode v.

See also URI::FTP.typecode=.

def comment_targets: () -> Array[Node | Location]

def comment_targets: () -> Array[Node | Location]

def comment_targets: () -> Array[Node | Location]

def comment_targets: () -> Array[Node | Location]

def comment_targets: () -> Array[Node | Location]

def comment_targets: () -> Array[Node | Location]

def comment_targets: () -> Array[Node | Location]

def comment_targets: () -> Array[Node | Location]

def comment_targets: () -> Array[Node | Location]

def comment_targets: () -> Array[Node | Location]

def comment_targets: () -> Array[Node | Location]

Search took: 8ms  ·  Total Results: 5438