Flowdock
method

attribute

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActiveResource::Schema

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

These similar methods exist in v4.0.2:

attribute(name, type, options = {}) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activeresource/lib/active_resource/schema.rb, line 29
    def attribute(name, type, options = {})
      raise ArgumentError, "Unknown Attribute type: #{type.inspect} for key: #{name.inspect}" unless type.nil? || Schema::KNOWN_ATTRIBUTE_TYPES.include?(type.to_s)

      the_type = type.to_s
      # TODO: add defaults
      #the_attr = [type.to_s]
      #the_attr << options[:default] if options.has_key? :default
      @attrs[name.to_s] = the_type
      self
    end
Register or log in to add new notes.