Class: Sluggable::Rails::Definition
- Inherits:
-
Object
- Object
- Sluggable::Rails::Definition
- Defined in:
- lib/sluggable/rails/definition.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#separator ⇒ Object
Returns the value of attribute separator.
Instance Method Summary collapse
-
#initialize(attribute = :slug, origin:, separator: '-', scope: nil) ⇒ Definition
constructor
A new instance of Definition.
Constructor Details
#initialize(attribute = :slug, origin:, separator: '-', scope: nil) ⇒ Definition
Returns a new instance of Definition.
4 5 6 7 8 9 |
# File 'lib/sluggable/rails/definition.rb', line 4 def initialize(attribute = :slug, origin:, separator: '-', scope: nil) self.attribute = attribute self.origin = origin self.separator = separator self.scope = scope end |
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
2 3 4 |
# File 'lib/sluggable/rails/definition.rb', line 2 def attribute @attribute end |
#origin ⇒ Object
Returns the value of attribute origin.
2 3 4 |
# File 'lib/sluggable/rails/definition.rb', line 2 def origin @origin end |
#scope ⇒ Object
Returns the value of attribute scope.
2 3 4 |
# File 'lib/sluggable/rails/definition.rb', line 2 def scope @scope end |
#separator ⇒ Object
Returns the value of attribute separator.
2 3 4 |
# File 'lib/sluggable/rails/definition.rb', line 2 def separator @separator end |