# File lib/rabl/engine.rb, line 226 def attribute(*args) if args.first.is_a?(Hash) # :foo => :bar, :bar => :baz attr_aliases = args.first.except(:if, :unless) conditions = args.first.slice(:if, :unless) attr_aliases.each do |key, as| attribute(key, conditions.merge(:as => as)) end else # array of attributes i.e :foo, :bar, :baz options = args.extract_options! args.each do |name| @_settings[:attributes] << { :name => name, :options => options } end end end