Class: DCHouse
Overview
-
datacenter: datacenter1 host: 10.81.13.169 username: space password: spaceapptest datacenterpath: /home/space/datacenter/ db01:
dbpath: /home/space/database/mysql5.1.30/ dbuser: root dbpass: "123456" dbport: "3308"
db02:
dbpath: /home/space/database/mysql5.22/ dbuser: root dbpass: "123456" dbport: "3308"
Constant Summary collapse
- @@instance =
nil
Class Method Summary collapse
Instance Method Summary collapse
-
#get_by_name(name) ⇒ Object
功能: 根据名字获取数据中心的相关信息.
Methods inherited from DataHouse
Constructor Details
This class inherits a constructor from DataHouse
Class Method Details
.get_instance ⇒ Object
372 373 374 375 |
# File 'lib/common/data_house.rb', line 372 def self.get_instance @@instance = new("datacenter") unless @@instance @@instance end |
Instance Method Details
#get_by_name(name) ⇒ Object
384 385 386 387 388 |
# File 'lib/common/data_house.rb', line 384 def get_by_name(name) @data_house.find do |u| u["datacenter"] == name if u.key? "datacenter" end end |