Class: Falcon::Host
- Inherits:
-
Object
- Object
- Falcon::Host
- Defined in:
- lib/falcon/hosts.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#ssl_certificate ⇒ Object
Returns the value of attribute ssl_certificate.
-
#ssl_context ⇒ Object
Returns the value of attribute ssl_context.
-
#ssl_key ⇒ Object
Returns the value of attribute ssl_key.
Instance Method Summary collapse
- #freeze ⇒ Object
-
#initialize ⇒ Host
constructor
A new instance of Host.
- #ssl_certificate_path=(path) ⇒ Object
- #ssl_key_path=(path) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ Host
Returns a new instance of Host.
25 26 27 28 29 30 31 32 |
# File 'lib/falcon/hosts.rb', line 25 def initialize @app = nil @endpoint = nil @ssl_certificate = nil @ssl_key = nil @ssl_context = nil end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
34 35 36 |
# File 'lib/falcon/hosts.rb', line 34 def app @app end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
36 37 38 |
# File 'lib/falcon/hosts.rb', line 36 def endpoint @endpoint end |
#ssl_certificate ⇒ Object
Returns the value of attribute ssl_certificate.
38 39 40 |
# File 'lib/falcon/hosts.rb', line 38 def ssl_certificate @ssl_certificate end |
#ssl_context ⇒ Object
Returns the value of attribute ssl_context.
40 41 42 |
# File 'lib/falcon/hosts.rb', line 40 def ssl_context @ssl_context end |
#ssl_key ⇒ Object
Returns the value of attribute ssl_key.
39 40 41 |
# File 'lib/falcon/hosts.rb', line 39 def ssl_key @ssl_key end |
Instance Method Details
#freeze ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/falcon/hosts.rb', line 42 def freeze return if frozen? ssl_context super end |
#ssl_certificate_path=(path) ⇒ Object
50 51 52 |
# File 'lib/falcon/hosts.rb', line 50 def ssl_certificate_path= path @ssl_certificate = OpenSSL::X509::Certificate.new(File.read(path)) end |
#ssl_key_path=(path) ⇒ Object
54 55 56 |
# File 'lib/falcon/hosts.rb', line 54 def ssl_key_path= path @ssl_key = OpenSSL::PKey::RSA.new(File.read(path)) end |