class Nucleus::Provider
The {Provider} model will initially be imported from .yaml
description files and shall be persisted in the {Nucleus::DB::Store store}. The provider has the following properties:
-
id (String)
-
name (String)
-
vendor (
Nucleus::Vendor
) -
endpoints (Array<Nucleus::Endpoint>)
@author Cedric Roeck (cedric.roeck@gmail.com) @since 0.1.0
Attributes
endpoints[RW]
vendor[RW]
Public Class Methods
new(hash = nil)
click to toggle source
Calls superclass method
Nucleus::AbstractModel::new
# File lib/nucleus/core/models/provider.rb, line 17 def initialize(hash = nil) super(hash) @endpoints = [] return if hash.nil? return unless hash.key?('endpoints') @endpoints = hash['endpoints'].map! { |e| e.is_a?(Nucleus::Endpoint) ? e : Nucleus::Endpoint.new(e) } end