Sha256: 7ac77788e86ed4454f481502f4c8d25d1e3067e509c72ae2b4a37726624445c1
Contents?: true
Size: 1.26 KB
Versions: 1
Compression:
Stored size: 1.26 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 { client: nil, colour: {}, name: '', repository: Vedeu::Repositories::RepositoryTestModule, style: [], } end end # ModelTestClass end # Repositories end # Vedeu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.8.0 | test/support/helpers/model_test_class.rb |