method
new
v7.1.3.4 -
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 109
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