Module: Awsbix::Conf
- Included in:
- Awsbix
- Defined in:
- lib/awsbix/conf.rb
Instance Method Summary collapse
Instance Method Details
#configured? ⇒ Boolean
33 34 35 36 37 38 39 40 |
# File 'lib/awsbix/conf.rb', line 33 def configured?() # return 1 if config exists if @conf then return true else return false end end |
#get_conf(item) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/awsbix/conf.rb', line 42 def get_conf(item) if self.configured?() then @conf[item] else raise Awsbix::ErrorNoConfiguration end end |
#read(file) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/awsbix/conf.rb', line 24 def read(file) if (File.exists?(file)) then @conf = YAML.load_file(file) return @conf else raise Awsbix::ErrorNoConfiguration end end |