Sha256: e6d8a8adb7c8c04eea6df3b3a2faae9cd03e627f3b6fdb95386646c998d1d665
Contents?: true
Size: 425 Bytes
Versions: 4
Compression:
Stored size: 425 Bytes
Contents
module RailsTemplater class FixtureReplacement DEFAULT = :factory_girl SUPPORTED_TYPES = [:factory_girl] def type @type || DEFAULT end def type=(value) raise NotSupportedError unless SUPPORTED_TYPES.include?(value) @type = value end SUPPORTED_TYPES.each do |type| define_method "#{type}?" do self.type == type end end end end
Version data entries
4 entries across 4 versions & 1 rubygems