Class: Gopher::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/gopher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#appObject

Returns the value of attribute app.



76
77
78
# File 'lib/gopher.rb', line 76

def app
  @app
end

Instance Method Details

#bindtoObject



85
# File 'lib/gopher.rb', line 85

def bindto; app.respond_to?(:bindto) ? app.bindto : '0.0.0.0' end

#call(*args) ⇒ Object



87
# File 'lib/gopher.rb', line 87

def call(*args); end

#hostObject



83
# File 'lib/gopher.rb', line 83

def host; app.respond_to?(:host) ? app.host : 'localhost' end

#portObject



84
# File 'lib/gopher.rb', line 84

def port; app.respond_to?(:port) ? app.port : 70 end

#with(app) ⇒ Object



78
79
80
81
# File 'lib/gopher.rb', line 78

def with(app)
  @app = app
  self
end