method
new
v3.2.13 -
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 40
def initialize(name, type=nil, index_type=false, attr_options={})
@name = name
@type = (type.presence || :string).to_sym
@has_index = %(index uniq).include?(index_type)
@has_uniq_index = %(uniq).include?(index_type)
@attr_options = attr_options
end