Class: MonkeysPaw::Config
- Inherits:
-
Object
- Object
- MonkeysPaw::Config
- Defined in:
- lib/monkeyspaw/config.rb
Instance Attribute Summary collapse
-
#ai_model ⇒ Object
Returns the value of attribute ai_model.
-
#ai_provider ⇒ Object
Returns the value of attribute ai_provider.
-
#assets_dir ⇒ Object
Returns the value of attribute assets_dir.
-
#caching_enabled ⇒ Object
Returns the value of attribute caching_enabled.
-
#components_dir ⇒ Object
Returns the value of attribute components_dir.
-
#host ⇒ Object
Returns the value of attribute host.
-
#pages_dir ⇒ Object
Returns the value of attribute pages_dir.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/monkeyspaw/config.rb', line 12 def initialize @ai_provider = :gemini @ai_model = 'gemini-2.0-flash-exp' @pages_dir = 'wishes' @components_dir = 'components' @assets_dir = 'assets' @port = 1337 @host = "localhost" @caching_enabled = true end |
Instance Attribute Details
#ai_model ⇒ Object
Returns the value of attribute ai_model.
3 4 5 |
# File 'lib/monkeyspaw/config.rb', line 3 def ai_model @ai_model end |
#ai_provider ⇒ Object
Returns the value of attribute ai_provider.
3 4 5 |
# File 'lib/monkeyspaw/config.rb', line 3 def ai_provider @ai_provider end |
#assets_dir ⇒ Object
Returns the value of attribute assets_dir.
3 4 5 |
# File 'lib/monkeyspaw/config.rb', line 3 def assets_dir @assets_dir end |
#caching_enabled ⇒ Object
Returns the value of attribute caching_enabled.
3 4 5 |
# File 'lib/monkeyspaw/config.rb', line 3 def caching_enabled @caching_enabled end |
#components_dir ⇒ Object
Returns the value of attribute components_dir.
3 4 5 |
# File 'lib/monkeyspaw/config.rb', line 3 def components_dir @components_dir end |
#host ⇒ Object
Returns the value of attribute host.
3 4 5 |
# File 'lib/monkeyspaw/config.rb', line 3 def host @host end |
#pages_dir ⇒ Object
Returns the value of attribute pages_dir.
3 4 5 |
# File 'lib/monkeyspaw/config.rb', line 3 def pages_dir @pages_dir end |
#port ⇒ Object
Returns the value of attribute port.
3 4 5 |
# File 'lib/monkeyspaw/config.rb', line 3 def port @port end |
Instance Method Details
#to_h ⇒ Object
23 24 25 26 27 |
# File 'lib/monkeyspaw/config.rb', line 23 def to_h instance_variables.each_with_object({}) do |var, hash| hash[var.to_s.delete('@').to_sym] = instance_variable_get(var) end end |