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
31 32 33 |
# File 'lib/socialcastr.rb', line 31 def debug @debug ||= false end |
#format ⇒ Object
27 28 29 |
# File 'lib/socialcastr.rb', line 27 def format @format ||= 'xml' end |
#ready? ⇒ Boolean
23 24 25 |
# File 'lib/socialcastr.rb', line 23 def ready? (ATTRIBUTES - [:config_file]).map { |a| self.send a }.map(&:nil?).none? end |
#reset ⇒ Object
35 36 37 38 39 40 |
# File 'lib/socialcastr.rb', line 35 def reset ATTRIBUTES.each do |attribute| send(attribute.to_s + "=", nil) end return self end |