1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#require 'simplecov'
#SimpleCov.start do
#add_filter 'spec'
#end
require 'attr_required'
require 'attr_optional'
require 'rspec'
class A
include AttrRequired, AttrOptional
attr_required :attr_required_a
attr_optional :attr_optional_a
end
class B < A
attr_required :attr_required_b
attr_optional :attr_optional_b
end
class C < B
undef_required_attributes :attr_required_a
undef_optional_attributes :attr_optional_a
attr_optional :attr_required_b
attr_required :attr_optional_b
end
class OnlyRequired
include AttrRequired
attr_required :only_required
end
class OnlyOptional
include AttrOptional
attr_optional :only_optional
end
|