lib/evil/client/model.rb in evil-client-0.2.3 vs lib/evil/client/model.rb in evil-client-0.3.0
- old
+ new
@@ -23,11 +23,11 @@
def attributes
@attributes ||= []
end
- def option(name, type = nil, **opts)
- super.tap { attributes << name.to_sym }
+ def option(name, type = nil, as: nil, **opts)
+ super.tap { attributes << (as || name).to_sym }
end
alias_method :attribute, :option
alias_method :param, :option
private