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