What is an “authenticator” in the code below and where is it defined.
As for the “what” - authenticatorthis is a method that is called with a positional argument :server and a is a block argument (part do ... end).
"" - Ruby.
IDE, :
$ git clone https://github.com/atech/postal.git
Cloning into 'postal'...
remote: Counting objects: 1139, done.
remote: Total 1139 (delta 0), reused 0 (delta 0), pack-reused 1139
Receiving objects: 100% (1139/1139), 2.09 MiB | 1.22 MiB/s, done.
Resolving deltas: 100% (502/502), done.
$ cd postal
$ bundle install
Fetching gem metadata from https:
Fetching version metadata from https:
Fetching dependency metadata from https:
Fetching https:
Fetching https:
Installing rake 11.3.0
Installing multipart-post 2.0.0
Installing concurrent-ruby 1.0.5
...
$ bundle console
irb(main):001:0>
, :
irb(main):001:0> method(:authenticator)
NameError: undefined method `authenticator'
...
. , , , :
irb(main):002:0> ObjectSpace.each_object(Module).select { |m| m.instance_methods.include?(:authenticator) }
Moonrope... . , :
irb(main):003:0> Moonrope::DSL::BaseDSL.instance_method(:authenticator).source_location
, :
irb(main):004:0> ^Z
zsh: suspended bundle console
$ vi +73 $(bundle show moonrope)/lib/moonrope/dsl/base_dsl.rb
:
