Class: TailwindThemePicker::Configuration
- Inherits:
-
Object
- Object
- TailwindThemePicker::Configuration
- Defined in:
- lib/tailwind_theme_picker/configuration.rb
Constant Summary collapse
- DEFAULT_THEMES =
%w[ red orange amber yellow lime green emerald teal cyan sky blue indigo violet purple fuchsia pink rose slate gray zinc neutral stone taupe mauve mist olive ].freeze
Instance Attribute Summary collapse
-
#cookie_max_age ⇒ Object
Returns the value of attribute cookie_max_age.
-
#default ⇒ Object
Returns the value of attribute default.
-
#mode_cookie ⇒ Object
Returns the value of attribute mode_cookie.
-
#theme_cookie ⇒ Object
Returns the value of attribute theme_cookie.
-
#themes ⇒ Object
Returns the value of attribute themes.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 |
# File 'lib/tailwind_theme_picker/configuration.rb', line 13 def initialize @themes = DEFAULT_THEMES.dup @default = "sky" @theme_cookie = "theme" @mode_cookie = "mode" @cookie_max_age = 60 * 60 * 24 * 365 end |
Instance Attribute Details
#cookie_max_age ⇒ Object
Returns the value of attribute cookie_max_age.
5 6 7 |
# File 'lib/tailwind_theme_picker/configuration.rb', line 5 def @cookie_max_age end |
#default ⇒ Object
Returns the value of attribute default.
5 6 7 |
# File 'lib/tailwind_theme_picker/configuration.rb', line 5 def default @default end |
#mode_cookie ⇒ Object
Returns the value of attribute mode_cookie.
5 6 7 |
# File 'lib/tailwind_theme_picker/configuration.rb', line 5 def @mode_cookie end |
#theme_cookie ⇒ Object
Returns the value of attribute theme_cookie.
5 6 7 |
# File 'lib/tailwind_theme_picker/configuration.rb', line 5 def @theme_cookie end |
#themes ⇒ Object
Returns the value of attribute themes.
5 6 7 |
# File 'lib/tailwind_theme_picker/configuration.rb', line 5 def themes @themes end |