Class: VagrantSymfony::Config::Config
- Inherits:
-
Object
- Object
- VagrantSymfony::Config::Config
- Defined in:
- lib/vagrant-symfony/config/config.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
Returns the value of attribute cmd.
-
#entry ⇒ Object
Returns the value of attribute entry.
-
#env ⇒ Object
Returns the value of attribute env.
-
#nginx_hostfile ⇒ Object
Returns the value of attribute nginx_hostfile.
-
#root ⇒ Object
Returns the value of attribute root.
-
#update_nginx ⇒ Object
Returns the value of attribute update_nginx.
-
#web ⇒ Object
Returns the value of attribute web.
Instance Method Summary collapse
- #commandName ⇒ Object
- #entryPoint ⇒ Object
- #environmentVariables ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #nginxHostfile ⇒ Object
- #rootFolder ⇒ Object
- #updateNginx ⇒ Object
- #webFolder ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
6 7 8 9 10 11 12 13 14 |
# File 'lib/vagrant-symfony/config/config.rb', line 6 def initialize @web = UNSET_VALUE @cmd = UNSET_VALUE @update_nginx = UNSET_VALUE @nginx_hostfile = UNSET_VALUE @root = UNSET_VALUE @entry = UNSET_VALUE @env = UNSET_VALUE end |
Instance Attribute Details
#cmd ⇒ Object
Returns the value of attribute cmd.
4 5 6 |
# File 'lib/vagrant-symfony/config/config.rb', line 4 def cmd @cmd end |
#entry ⇒ Object
Returns the value of attribute entry.
4 5 6 |
# File 'lib/vagrant-symfony/config/config.rb', line 4 def entry @entry end |
#env ⇒ Object
Returns the value of attribute env.
4 5 6 |
# File 'lib/vagrant-symfony/config/config.rb', line 4 def env @env end |
#nginx_hostfile ⇒ Object
Returns the value of attribute nginx_hostfile.
4 5 6 |
# File 'lib/vagrant-symfony/config/config.rb', line 4 def nginx_hostfile @nginx_hostfile end |
#root ⇒ Object
Returns the value of attribute root.
4 5 6 |
# File 'lib/vagrant-symfony/config/config.rb', line 4 def root @root end |
#update_nginx ⇒ Object
Returns the value of attribute update_nginx.
4 5 6 |
# File 'lib/vagrant-symfony/config/config.rb', line 4 def update_nginx @update_nginx end |
#web ⇒ Object
Returns the value of attribute web.
4 5 6 |
# File 'lib/vagrant-symfony/config/config.rb', line 4 def web @web end |
Instance Method Details
#commandName ⇒ Object
35 36 37 38 |
# File 'lib/vagrant-symfony/config/config.rb', line 35 def commandName return "./app/console" if @cmd == UNSET_VALUE return @cmd end |
#entryPoint ⇒ Object
16 17 18 19 20 21 |
# File 'lib/vagrant-symfony/config/config.rb', line 16 def entryPoint return "app.php" if @entry == UNSET_VALUE return @entry[1..-1] if @entry[0] == '/' return @entry[2..-1] if @entry[0] == '.' && @entry[1] == '/' return @entry end |
#environmentVariables ⇒ Object
50 51 52 53 |
# File 'lib/vagrant-symfony/config/config.rb', line 50 def environmentVariables return {} unless @env.is_a?(Hash) return @env end |
#nginxHostfile ⇒ Object
45 46 47 48 |
# File 'lib/vagrant-symfony/config/config.rb', line 45 def nginxHostfile return "/etc/nginx/sites-enabled/default" if @nginx_hostfile == UNSET_VALUE return @nginx_hostfile end |
#rootFolder ⇒ Object
23 24 25 26 27 |
# File 'lib/vagrant-symfony/config/config.rb', line 23 def rootFolder return "/vagrant" if @root == UNSET_VALUE return @root[0..-2] if @root[-1] == '/' return @root end |
#updateNginx ⇒ Object
40 41 42 43 |
# File 'lib/vagrant-symfony/config/config.rb', line 40 def updateNginx return false if @update_nginx == UNSET_VALUE return @update_nginx end |
#webFolder ⇒ Object
29 30 31 32 33 |
# File 'lib/vagrant-symfony/config/config.rb', line 29 def webFolder return "./web" if @web == UNSET_VALUE return @web[0..-2] if @web[-1] == '/' return @web end |