lib/alba.rb in alba-2.0.0 vs lib/alba.rb in alba-2.0.1
- old
+ new
@@ -67,10 +67,10 @@
# @param block [Block] resource body
# @return [Class<Alba::Resource>] resource class
def resource_class(&block)
klass = Class.new
klass.include(Alba::Resource)
- klass.class_eval(&block)
+ klass.class_eval(&block) if block
klass
end
# @param name [String] a String Alba infers resource name with
# @param nesting [String, nil] namespace Alba tries to find resource class in