Class: Nucleus::Endpoint
- Inherits:
-
AbstractModel
- Object
- AbstractModel
- Nucleus::Endpoint
- Includes:
- Kwalify::Util::HashLike
- Defined in:
- lib/nucleus/core/models/endpoint.rb
Overview
The Endpoint model will initially be imported from .yaml
description files and shall be persisted in the store. The endpoint has the following properties:
-
id (String)
-
name (String)
-
provider (Nucleus::Provider)
-
url (String)
-
app_domain (String)
-
trust (Boolean)
Instance Attribute Summary collapse
-
#app_domain ⇒ Object
str.
- #provider ⇒ Object
-
#trust ⇒ Object
bool.
-
#url ⇒ Object
str.
Attributes inherited from AbstractModel
#created_at, #id, #name, #updated_at
Instance Method Summary collapse
-
#initialize(hash = nil) ⇒ Endpoint
constructor
A new instance of Endpoint.
Methods inherited from AbstractModel
Constructor Details
#initialize(hash = nil) ⇒ Endpoint
Returns a new instance of Endpoint.
21 22 23 24 25 26 27 28 |
# File 'lib/nucleus/core/models/endpoint.rb', line 21 def initialize(hash = nil) super(hash) @trust = false return if hash.nil? @url = hash['url'] @app_domain = hash['app_domain'] @trust = hash['trust'] if hash.key?('trust') end |
Instance Attribute Details
#app_domain ⇒ Object
str
18 19 20 |
# File 'lib/nucleus/core/models/endpoint.rb', line 18 def app_domain @app_domain end |
#provider ⇒ Object
16 17 18 |
# File 'lib/nucleus/core/models/endpoint.rb', line 16 def provider @provider end |
#trust ⇒ Object
bool
19 20 21 |
# File 'lib/nucleus/core/models/endpoint.rb', line 19 def trust @trust end |
#url ⇒ Object
str
17 18 19 |
# File 'lib/nucleus/core/models/endpoint.rb', line 17 def url @url end |