Class: Rays::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/rays/config/environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (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

#backupObject

Raises:



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

Returns:

  • (Boolean)


69
70
71
# File 'lib/rays/config/environment.rb', line 69

def backup_enabled?
  @backup.nil?
end

#databaseObject

Raises:



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

Returns:

  • (Boolean)


51
52
53
# File 'lib/rays/config/environment.rb', line 51

def database_enabled?
  @database.nil?
end

#liferayObject

Raises:



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

Returns:

  • (Boolean)


42
43
44
# File 'lib/rays/config/environment.rb', line 42

def liferay_enabled?
  @liferay.nil?
end

#solrObject

Raises:



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

Returns:

  • (Boolean)


60
61
62
# File 'lib/rays/config/environment.rb', line 60

def solr_enabled?
  @solr.nil?
end