Class: Gopher::Handler

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#applicationObject

Returns the value of attribute application.



74
75
76
# File 'lib/gopher.rb', line 74

def application
  @application
end

Instance Method Details

#call(*args) ⇒ Object



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

def call(*args); end

#hostObject



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

def host; application.respond_to?(:host) ? application.host : '0.0.0.0' end

#portObject



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

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

#with(application) ⇒ Object



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

def with(application)
  @application = application
  self
end