Sha256: 53de99f2b531c3c2c2d2c6ff6f978336da32f6b6bb72305269251b1e37d85d3f
Contents?: true
Size: 1008 Bytes
Versions: 14
Compression:
Stored size: 1008 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) @attributes.each { |key, value| instance_variable_set("@#{key}", value) } end private # Returns the default options/attributes for this class. # def defaults { colour: {}, name: '', repository: Vedeu::RepositoryTestModule, style: [], } end end # ModelTestClass end # Vedeu
Version data entries
14 entries across 14 versions & 1 rubygems