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