Module: DataMapper::Is::Slug::ClassMethods

Defined in:
lib/dm-is-slug/is/slug.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#slug_optionsObject (readonly)

Returns the value of attribute slug_options.



102
103
104
# File 'lib/dm-is-slug/is/slug.rb', line 102

def slug_options
  @slug_options
end

Instance Method Details

#slug_mutable?Boolean

Returns:

  • (Boolean)


104
105
106
# File 'lib/dm-is-slug/is/slug.rb', line 104

def slug_mutable?
  slug_options[:mutable]
end

#slug_propertyObject



116
117
118
# File 'lib/dm-is-slug/is/slug.rb', line 116

def slug_property
  detect_slug_property_by_name(:slug)
end

#slug_sourceObject



108
109
110
# File 'lib/dm-is-slug/is/slug.rb', line 108

def slug_source
  slug_options[:source] ? slug_options[:source].to_sym : nil
end

#slug_source_propertyObject



112
113
114
# File 'lib/dm-is-slug/is/slug.rb', line 112

def slug_source_property
  detect_slug_property_by_name(slug_source)
end