# File lib/rabl/engine.rb, line 152 def attribute(*args) if args.first.is_a?(Hash) # :foo => :bar, :bar => :baz args.first.each_pair { |k,v| self.attribute(k, :as => v) } else # array of attributes i.e :foo, :bar, :baz options = args.extract_options! args.each { |name| @_options[:attributes][name] = options[:as] || name } end end