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 33 |
# 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.
35 36 37 |
# File 'lib/falcon/hosts.rb', line 35 def app @app end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
37 38 39 |
# File 'lib/falcon/hosts.rb', line 37 def endpoint @endpoint end |
#ssl_certificate ⇒ Object
Returns the value of attribute ssl_certificate.
39 40 41 |
# File 'lib/falcon/hosts.rb', line 39 def ssl_certificate @ssl_certificate end |
#ssl_context ⇒ Object
Returns the value of attribute ssl_context.
42 43 44 |
# File 'lib/falcon/hosts.rb', line 42 def ssl_context @ssl_context end |
#ssl_key ⇒ Object
Returns the value of attribute ssl_key.
40 41 42 |
# File 'lib/falcon/hosts.rb', line 40 def ssl_key @ssl_key end |
Instance Method Details
#freeze ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/falcon/hosts.rb', line 44 def freeze return if frozen? ssl_context super end |
#ssl_certificate_path=(path) ⇒ Object
52 53 54 |
# File 'lib/falcon/hosts.rb', line 52 def ssl_certificate_path= path @ssl_certificate = OpenSSL::X509::Certificate.new(File.read(path)) end |
#ssl_key_path=(path) ⇒ Object
56 57 58 |
# File 'lib/falcon/hosts.rb', line 56 def ssl_key_path= path @ssl_key = OpenSSL::PKey::RSA.new(File.read(path)) end |