Class: ElephantDrive::ServiceConfig
- Inherits:
-
Object
- Object
- ElephantDrive::ServiceConfig
- Defined in:
- lib/elephant-drive-service/config.rb
Instance Method Summary collapse
- #hashed_password ⇒ Object
-
#initialize(yaml) ⇒ ServiceConfig
constructor
A new instance of ServiceConfig.
- #to_hash ⇒ Object
Constructor Details
#initialize(yaml) ⇒ ServiceConfig
Returns a new instance of ServiceConfig.
5 6 7 8 9 10 11 |
# File 'lib/elephant-drive-service/config.rb', line 5 def initialize yaml yaml[:ws].each do |key,value| var_name = "@#{key.to_s}" self.instance_variable_set(var_name,value) self.class.class_eval { attr_reader key } end end |
Instance Method Details
#hashed_password ⇒ Object
17 18 19 |
# File 'lib/elephant-drive-service/config.rb', line 17 def hashed_password elephant_hash(password) end |
#to_hash ⇒ Object
13 14 15 |
# File 'lib/elephant-drive-service/config.rb', line 13 def to_hash Hash[instance_variables.map { |var| [var[1..-1].to_sym, instance_variable_get(var)] }].select { |k,v| [:wsdl, :log_level, :log, :ssl_verify_mode].include? k } end |