lib/shirinji/bean.rb in shirinji-0.0.4 vs lib/shirinji/bean.rb in shirinji-0.0.5
- old
+ new
@@ -19,11 +19,11 @@
instance_eval(&block) if block
end
# rubocop:enable Metrics/ParameterLists
- def attr(name, ref:)
- attributes[name] = Attribute.new(name, ref)
+ def attr(name, ref: nil, value: nil)
+ attributes[name] = Attribute.new(name, ref, value)
end
private
def check_params!(class_name, value)