Class: Gopher::MapHandler
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#result ⇒ Object
Returns the value of attribute result.
Attributes inherited from Handler
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(&block) ⇒ MapHandler
constructor
A new instance of MapHandler.
Methods inherited from Handler
Constructor Details
#initialize(&block) ⇒ MapHandler
92 93 94 |
# File 'lib/gopher.rb', line 92 def initialize(&block) @block = block end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
90 91 92 |
# File 'lib/gopher.rb', line 90 def block @block end |
#result ⇒ Object
Returns the value of attribute result.
90 91 92 |
# File 'lib/gopher.rb', line 90 def result @result end |
Instance Method Details
#call(*args) ⇒ Object
96 97 98 99 100 |
# File 'lib/gopher.rb', line 96 def call(*args) context = MapContext.new(host, port) context.instance_exec(*args, &block) context.result end |