Class: Bricky::Config
- Inherits:
-
Object
- Object
- Bricky::Config
- Defined in:
- lib/bricky/config.rb
Instance Attribute Summary collapse
-
#bricks ⇒ Object
Returns the value of attribute bricks.
-
#images ⇒ Object
Returns the value of attribute images.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #bricks_path ⇒ Object
- #cache_path ⇒ Object
- #from_yaml(file) ⇒ Object
- #hacker_path ⇒ Object
- #shim_path ⇒ Object
- #tmp_path ⇒ Object
Instance Attribute Details
#bricks ⇒ Object
Returns the value of attribute bricks.
7 8 9 |
# File 'lib/bricky/config.rb', line 7 def bricks @bricks end |
#images ⇒ Object
Returns the value of attribute images.
6 7 8 |
# File 'lib/bricky/config.rb', line 6 def images @images end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/bricky/config.rb', line 5 def name @name end |
Instance Method Details
#bricks_path ⇒ Object
21 22 23 |
# File 'lib/bricky/config.rb', line 21 def bricks_path File.("#{base_path}/etc/bricks", __FILE__) end |
#cache_path ⇒ Object
17 18 19 |
# File 'lib/bricky/config.rb', line 17 def cache_path "#{tmp_path}/cache" end |
#from_yaml(file) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/bricky/config.rb', line 9 def from_yaml(file) config = YAML.load_file(file)["bricky"] self.name = config["name"] self.images = config["images"] self.bricks = config["bricks"] end |
#hacker_path ⇒ Object
25 26 27 |
# File 'lib/bricky/config.rb', line 25 def hacker_path File.("#{base_path}/etc/hacker", __FILE__) end |
#shim_path ⇒ Object
33 34 35 |
# File 'lib/bricky/config.rb', line 33 def shim_path "#{tmp_path}/shim" end |