Class: Giddy::Config

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#system_idObject

system specific information



9
10
11
# File 'lib/giddy/config.rb', line 9

def system_id
  @system_id
end

#system_passwordObject

system specific information



9
10
11
# File 'lib/giddy/config.rb', line 9

def system_password
  @system_password
end

Class Method Details

.required_fieldsObject



4
5
6
# File 'lib/giddy/config.rb', line 4

def self.required_fields
  [ :system_id, :system_password ]
end

Instance Method Details

#check!Object



11
12
13
14
15
16
17
# File 'lib/giddy/config.rb', line 11

def check!
  self.class.required_fields.each do |required_field|
    unless send(required_field)
      raise "#{required_field} must be set in config"
    end
  end
end