Sha256: f0a08b9743fedc582a1186777b0ff1ce7f614df09eee2f9c3aedb06d46b087cf
Contents?: true
Size: 1.24 KB
Versions: 55
Compression:
Stored size: 1.24 KB
Contents
module Vedeu module Repositories module DSL class ModelTestClass include Vedeu::DSL include Vedeu::DSL::Presentation protected attr_reader :model end # DSL end # ModelTestClass 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::Repositories::Model include Vedeu::Presentation attr_accessor :background, :colour, :name, :style def initialize(attributes = {}) defaults.merge!(attributes).each do |key, value| instance_variable_set("@#{key}", value) end end private # Returns the default options/attributes for this class. # def defaults { colour: {}, name: '', repository: Vedeu::Repositories::RepositoryTestModule, style: [], } end end # ModelTestClass end # Repositories end # Vedeu
Version data entries
55 entries across 55 versions & 1 rubygems