Class: Rays::Environment
- Inherits:
-
Object
- Object
- Rays::Environment
- Defined in:
- lib/rays/config/environment.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #backup ⇒ Object
- #backup_enabled? ⇒ Boolean
- #database ⇒ Object
- #database_enabled? ⇒ Boolean
-
#initialize(name, liferay, database, solr, backup) ⇒ Environment
constructor
A new instance of Environment.
- #liferay ⇒ Object
- #liferay_enabled? ⇒ Boolean
- #solr ⇒ Object
- #solr_enabled? ⇒ Boolean
Constructor Details
#initialize(name, liferay, database, solr, backup) ⇒ Environment
Returns a new instance of Environment.
29 30 31 32 33 34 35 |
# File 'lib/rays/config/environment.rb', line 29 def initialize(name, liferay, database, solr, backup) @name = name @liferay = liferay @database = database @solr = solr @backup = backup end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
27 28 29 |
# File 'lib/rays/config/environment.rb', line 27 def name @name end |
Instance Method Details
#backup ⇒ Object
64 65 66 67 |
# File 'lib/rays/config/environment.rb', line 64 def backup raise RaysException.new('Backup is not enabled for this project') if @backup.nil? @backup end |
#backup_enabled? ⇒ Boolean
69 70 71 |
# File 'lib/rays/config/environment.rb', line 69 def backup_enabled? @backup.nil? end |
#database ⇒ Object
46 47 48 49 |
# File 'lib/rays/config/environment.rb', line 46 def database raise RaysException.new('Database server is not enabled for this project') if @database.nil? @database end |
#database_enabled? ⇒ Boolean
51 52 53 |
# File 'lib/rays/config/environment.rb', line 51 def database_enabled? @database.nil? end |
#liferay ⇒ Object
37 38 39 40 |
# File 'lib/rays/config/environment.rb', line 37 def liferay raise RaysException.new('Liferay is not enabled for this project') if @liferay.nil? @liferay end |
#liferay_enabled? ⇒ Boolean
42 43 44 |
# File 'lib/rays/config/environment.rb', line 42 def liferay_enabled? @liferay.nil? end |
#solr ⇒ Object
55 56 57 58 |
# File 'lib/rays/config/environment.rb', line 55 def solr raise RaysException.new('SOLR server is not enabled for this project') if @solr.nil? @solr end |
#solr_enabled? ⇒ Boolean
60 61 62 |
# File 'lib/rays/config/environment.rb', line 60 def solr_enabled? @solr.nil? end |