Sha256: 86251516209ca02f5a0957bfdcb673444146ac1425ed8fc061f9c3bcecf82904
Contents?: true
Size: 720 Bytes
Versions: 3
Compression:
Stored size: 720 Bytes
Contents
module Nucleus # 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:<br> # * id (String) # * name (String) # * providers (Array<Nucleus::Provider>) # # @author Cedric Roeck (cedric.roeck@gmail.com) # @since 0.1.0 class Vendor < Nucleus::AbstractModel attr_accessor :providers # seq 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 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nucleus-0.3.1 | lib/nucleus/core/models/vendor.rb |
nucleus-0.2.0 | lib/nucleus/core/models/vendor.rb |
nucleus-0.1.0 | lib/nucleus/core/models/vendor.rb |