Class: Blacksmith::Configure

Inherits:
Object
  • Object
show all
Defined in:
lib/blacksmith/configure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfigure

Returns a new instance of Configure.



5
6
7
# File 'lib/blacksmith/configure.rb', line 5

def initialize
  exec_config_file
end

Instance Attribute Details

#build_filesObject

Returns the value of attribute build_files.



3
4
5
# File 'lib/blacksmith/configure.rb', line 3

def build_files
  @build_files
end

#compileObject

Returns the value of attribute compile.



3
4
5
# File 'lib/blacksmith/configure.rb', line 3

def compile
  @compile
end

#gzipObject

Returns the value of attribute gzip.



3
4
5
# File 'lib/blacksmith/configure.rb', line 3

def gzip
  @gzip
end

#jshintObject

Returns the value of attribute jshint.



3
4
5
# File 'lib/blacksmith/configure.rb', line 3

def jshint
  @jshint
end

Instance Method Details

#build_folderObject



19
20
21
# File 'lib/blacksmith/configure.rb', line 19

def build_folder
  Blacksmith.app.root + '/build'
end

#envObject



27
28
29
# File 'lib/blacksmith/configure.rb', line 27

def env
  :production
end

#exec_config_fileObject



14
15
16
# File 'lib/blacksmith/configure.rb', line 14

def exec_config_file
  instance_eval(File.read(File.join(Dir.pwd, 'config.rb')))
end

#set(k, v) ⇒ Object



10
11
12
# File 'lib/blacksmith/configure.rb', line 10

def set(k, v)
  instance_variable_set(:"@#{k}", v)
end

#source_folderObject



22
23
24
# File 'lib/blacksmith/configure.rb', line 22

def source_folder
  Blacksmith.app.root + '/source'
end