Class: Rad::Http
- Defined in:
- lib/rad/http/_http.rb,
lib/rad/http/_require.rb
Defined Under Namespace
Classes: HttpAdapter, RackAdapter, Request, Response
Instance Attribute Summary collapse
- #browser_generated_formats ⇒ Object
- #browser_generated_types ⇒ Object
-
#default_format ⇒ Object
Returns the value of attribute default_format.
-
#host ⇒ Object
Returns the value of attribute host.
-
#http_adapter ⇒ Object
readonly
inject environment: :environment.
-
#port ⇒ Object
Returns the value of attribute port.
- #public_path ⇒ Object
-
#rack_adapter ⇒ Object
readonly
inject environment: :environment.
-
#session ⇒ Object
Returns the value of attribute session.
-
#static ⇒ Object
Returns the value of attribute static.
-
#url_root ⇒ Object
Returns the value of attribute url_root.
Instance Method Summary collapse
-
#initialize ⇒ Http
constructor
A new instance of Http.
- #public_path? ⇒ Boolean
- #static? ⇒ Boolean
Constructor Details
#initialize ⇒ Http
Returns a new instance of Http.
9 10 11 |
# File 'lib/rad/http/_http.rb', line 9 def initialize @rack_adapter, @http_adapter = Rad::Http::RackAdapter.new, Rad::Http::HttpAdapter.new end |
Instance Attribute Details
#browser_generated_formats ⇒ Object
7 |
# File 'lib/rad/http/_http.rb', line 7 def browser_generated_formats; @browser_generated_formats ||= [] end |
#browser_generated_types ⇒ Object
6 |
# File 'lib/rad/http/_http.rb', line 6 def browser_generated_types; @browser_generated_types ||= [] end |
#default_format ⇒ Object
Returns the value of attribute default_format.
8 9 10 |
# File 'lib/rad/http/_require.rb', line 8 def default_format @default_format end |
#host ⇒ Object
Returns the value of attribute host.
8 9 10 |
# File 'lib/rad/http/_require.rb', line 8 def host @host end |
#http_adapter ⇒ Object (readonly)
inject environment: :environment
3 4 5 |
# File 'lib/rad/http/_http.rb', line 3 def http_adapter @http_adapter end |
#port ⇒ Object
Returns the value of attribute port.
8 9 10 |
# File 'lib/rad/http/_require.rb', line 8 def port @port end |
#public_path ⇒ Object
13 14 15 |
# File 'lib/rad/http/_require.rb', line 13 def public_path @public_path || "#{rad.runtime_path}/public" end |
#rack_adapter ⇒ Object (readonly)
inject environment: :environment
3 4 5 |
# File 'lib/rad/http/_http.rb', line 3 def rack_adapter @rack_adapter end |
#session ⇒ Object
Returns the value of attribute session.
8 9 10 |
# File 'lib/rad/http/_require.rb', line 8 def session @session end |
#static ⇒ Object
Returns the value of attribute static.
8 9 10 |
# File 'lib/rad/http/_require.rb', line 8 def static @static end |
#url_root ⇒ Object
Returns the value of attribute url_root.
8 9 10 |
# File 'lib/rad/http/_require.rb', line 8 def url_root @url_root end |
Instance Method Details
#public_path? ⇒ Boolean
16 |
# File 'lib/rad/http/_require.rb', line 16 def public_path?; !!public_path end |
#static? ⇒ Boolean
10 |
# File 'lib/rad/http/_require.rb', line 10 def static?; !!@static end |