Method: CostAgent#initialize
- Defined in:
- lib/costagent.rb
#initialize(subdomain, username, password) ⇒ CostAgent
Initialize and validate input data
61 62 63 64 65 66 67 68 69 |
# File 'lib/costagent.rb', line 61 def initialize(subdomain, username, password) self.subdomain = subdomain self.username = username self.password = password [:subdomain, :username, :password].each do |f| raise "No #{f} configured!" if self.send(f).nil? || self.send(f).empty? end end |