Class: RailsToastify::Configuration
- Inherits:
-
Object
- Object
- RailsToastify::Configuration
- Defined in:
- lib/rails_toastify.rb
Instance Attribute Summary collapse
-
#alert_animation ⇒ Object
Returns the value of attribute alert_animation.
-
#alert_duration ⇒ Object
Returns the value of attribute alert_duration.
-
#alert_theme ⇒ Object
Returns the value of attribute alert_theme.
-
#alert_type ⇒ Object
Returns the value of attribute alert_type.
-
#notice_animation ⇒ Object
Returns the value of attribute notice_animation.
-
#notice_duration ⇒ Object
Returns the value of attribute notice_duration.
-
#notice_theme ⇒ Object
Returns the value of attribute notice_theme.
-
#notice_type ⇒ Object
Returns the value of attribute notice_type.
-
#position ⇒ Object
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rails_toastify.rb', line 20 def initialize @position = 'toast-container-top-right' @notice_animation = 'bounce' @alert_animation = 'zoom' @notice_duration = 3000 @alert_duration = 3000 @notice_theme = 'light' @alert_theme = 'light' @notice_type = 'default' @alert_type = 'error' end |
Instance Attribute Details
#alert_animation ⇒ Object
Returns the value of attribute alert_animation.
17 18 19 |
# File 'lib/rails_toastify.rb', line 17 def alert_animation @alert_animation end |
#alert_duration ⇒ Object
Returns the value of attribute alert_duration.
17 18 19 |
# File 'lib/rails_toastify.rb', line 17 def alert_duration @alert_duration end |
#alert_theme ⇒ Object
Returns the value of attribute alert_theme.
17 18 19 |
# File 'lib/rails_toastify.rb', line 17 def alert_theme @alert_theme end |
#alert_type ⇒ Object
Returns the value of attribute alert_type.
17 18 19 |
# File 'lib/rails_toastify.rb', line 17 def alert_type @alert_type end |
#notice_animation ⇒ Object
Returns the value of attribute notice_animation.
17 18 19 |
# File 'lib/rails_toastify.rb', line 17 def notice_animation @notice_animation end |
#notice_duration ⇒ Object
Returns the value of attribute notice_duration.
17 18 19 |
# File 'lib/rails_toastify.rb', line 17 def notice_duration @notice_duration end |
#notice_theme ⇒ Object
Returns the value of attribute notice_theme.
17 18 19 |
# File 'lib/rails_toastify.rb', line 17 def notice_theme @notice_theme end |
#notice_type ⇒ Object
Returns the value of attribute notice_type.
17 18 19 |
# File 'lib/rails_toastify.rb', line 17 def notice_type @notice_type end |
#position ⇒ Object
Returns the value of attribute position.
17 18 19 |
# File 'lib/rails_toastify.rb', line 17 def position @position end |
Instance Method Details
#to_h ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/rails_toastify.rb', line 32 def to_h { position: @position, notice_animation: @notice_animation, alert_animation: @alert_animation, notice_duration: @notice_duration, alert_duration: @alert_duration, notice_theme: @notice_theme, alert_theme: @alert_theme, notice_type: @notice_type, alert_type: @alert_type } end |