Sha256: 01006f16977cdb993e50bc088e2d4075dc7fc6d76cd251eed2adadc3e43114e6
Contents?: true
Size: 964 Bytes
Versions: 21
Compression:
Stored size: 964 Bytes
Contents
require 'vedeu/repositories/model' require 'vedeu/output/presentation' module Vedeu module RepositoryTestModule extend self def by_name(name) model end # The real repository stores the model and returns it. def store(model) model end private # A storage solution that uses memory to persist models. def in_memory {} end end # RepositoryTestModule class ModelTestClass include Vedeu::Model include Vedeu::Presentation attr_accessor :background, :colour, :name, :style def initialize(attributes = {}) @attributes = defaults.merge!(attributes) @colour = @attributes[:colour] @name = @attributes[:name] @style = @attributes[:style] @repository = Vedeu::RepositoryTestModule end private def defaults { colour: {}, name: '', style: [], } end end # ModelTestClass end # Vedeu
Version data entries
21 entries across 21 versions & 1 rubygems