Class: MonkeysPaw::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/monkeyspaw/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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_modelObject

Returns the value of attribute ai_model.



3
4
5
# File 'lib/monkeyspaw/config.rb', line 3

def ai_model
  @ai_model
end

#ai_providerObject

Returns the value of attribute ai_provider.



3
4
5
# File 'lib/monkeyspaw/config.rb', line 3

def ai_provider
  @ai_provider
end

#assets_dirObject

Returns the value of attribute assets_dir.



3
4
5
# File 'lib/monkeyspaw/config.rb', line 3

def assets_dir
  @assets_dir
end

#caching_enabledObject

Returns the value of attribute caching_enabled.



3
4
5
# File 'lib/monkeyspaw/config.rb', line 3

def caching_enabled
  @caching_enabled
end

#components_dirObject

Returns the value of attribute components_dir.



3
4
5
# File 'lib/monkeyspaw/config.rb', line 3

def components_dir
  @components_dir
end

#hostObject

Returns the value of attribute host.



3
4
5
# File 'lib/monkeyspaw/config.rb', line 3

def host
  @host
end

#pages_dirObject

Returns the value of attribute pages_dir.



3
4
5
# File 'lib/monkeyspaw/config.rb', line 3

def pages_dir
  @pages_dir
end

#portObject

Returns the value of attribute port.



3
4
5
# File 'lib/monkeyspaw/config.rb', line 3

def port
  @port
end

Instance Method Details

#to_hObject



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