Class: Florby::Config

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

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



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

def initialize
  @options = {}
end

Instance Method Details

#copy_filesObject



20
21
22
# File 'lib/florby/config.rb', line 20

def copy_files
  @options['copy_from'] ||= []
end

#copy_from(path) ⇒ Object



15
16
17
18
# File 'lib/florby/config.rb', line 15

def copy_from(path)
  @options['copy_from'] ||= []
  @options['copy_from'] << path
end

#fetch(key) ⇒ Object



11
12
13
# File 'lib/florby/config.rb', line 11

def fetch(key)
  @options.fetch(key)
end

#host(url) ⇒ Object



24
25
26
# File 'lib/florby/config.rb', line 24

def host(url)
  @options['host'] = url
end

#load_file(path) ⇒ Object



7
8
9
# File 'lib/florby/config.rb', line 7

def load_file(path)
  instance_eval(File.read(File.join(Dir.pwd, path)))
end