method
new
v4.1.8 -
Show latest stable
- Class:
Rails::Generators::GeneratedAttribute
new(name, type=nil, index_type=false, attr_options={})public
No documentation available.
# File railties/lib/rails/generators/generated_attribute.rb, line 55
def initialize(name, type=nil, index_type=false, attr_options={})
@name = name
@type = type || :string
@has_index = INDEX_OPTIONS.include?(index_type)
@has_uniq_index = UNIQ_INDEX_OPTIONS.include?(index_type)
@attr_options = attr_options
end