Module: Gempage::Configuration
- Defined in:
- lib/gempage/configuration.rb
Instance Method Summary collapse
- #asset_gempage_path ⇒ Object
- #assets_path(name) ⇒ Object
- #gemfile_path ⇒ Object
- #gempage_dir(dir = nil) ⇒ Object
- #gempage_path ⇒ Object
- #root(root = nil) ⇒ Object
Instance Method Details
#asset_gempage_path ⇒ Object
21 22 23 24 25 26 |
# File 'lib/gempage/configuration.rb', line 21 def asset_gempage_path return @asset_gempage_path if defined? @asset_gempage_path and @asset_gempage_path @asset_gempage_path = File.join(gempage_path, 'assets', Gempage::VERSION) FileUtils.mkdir_p(@asset_gempage_path) @asset_gempage_path end |
#assets_path(name) ⇒ Object
28 29 30 |
# File 'lib/gempage/configuration.rb', line 28 def assets_path(name) File.join(@asset_gempage_path, name) end |
#gemfile_path ⇒ Object
32 33 34 |
# File 'lib/gempage/configuration.rb', line 32 def gemfile_path File.join(root, 'Gemfile') end |
#gempage_dir(dir = nil) ⇒ Object
10 11 12 13 |
# File 'lib/gempage/configuration.rb', line 10 def gempage_dir(dir=nil) return @gempage_dir if defined? @gempage_dir and dir.nil? @gempage_dir = (dir || 'public/gempage') end |
#gempage_path ⇒ Object
15 16 17 18 19 |
# File 'lib/gempage/configuration.rb', line 15 def gempage_path gempage_path = File.join(root, gempage_dir) FileUtils.mkdir_p gempage_path gempage_path end |