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
Returns a new instance of MapHandler.
93 94 95 |
# File 'lib/gopher.rb', line 93 def initialize(&block) @block = block end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
91 92 93 |
# File 'lib/gopher.rb', line 91 def block @block end |
#result ⇒ Object
Returns the value of attribute result.
91 92 93 |
# File 'lib/gopher.rb', line 91 def result @result end |
Instance Method Details
#call(*args) ⇒ Object
97 98 99 100 101 |
# File 'lib/gopher.rb', line 97 def call(*args) context = MapContext.new(host, port) context.instance_exec(*args, &block) context.result end |