Class: Socialcastr::Configuration
- Inherits:
-
Object
- Object
- Socialcastr::Configuration
- Includes:
- Singleton
- Defined in:
- lib/socialcastr.rb
Constant Summary collapse
- ATTRIBUTES =
[:domain, :username, :password, :format, :debug, :config_file]
Instance Method Summary collapse
Instance Method Details
#debug ⇒ Object
30 31 32 |
# File 'lib/socialcastr.rb', line 30 def debug @debug ||= false end |
#format ⇒ Object
26 27 28 |
# File 'lib/socialcastr.rb', line 26 def format @format ||= 'xml' end |
#ready? ⇒ Boolean
22 23 24 |
# File 'lib/socialcastr.rb', line 22 def ready? (ATTRIBUTES - [:config_file]).map { |a| self.send a }.map(&:nil?).none? end |
#reset ⇒ Object
34 35 36 37 38 39 |
# File 'lib/socialcastr.rb', line 34 def reset ATTRIBUTES.each do |attribute| send(attribute.to_s + "=", nil) end return self end |