Class: Socialcastr::Configuration

Inherits:
Object
  • Object
show all
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

#debugObject



30
31
32
# File 'lib/socialcastr.rb', line 30

def debug
  @debug ||= false
end

#formatObject



26
27
28
# File 'lib/socialcastr.rb', line 26

def format
  @format ||= 'xml'
end

#ready?Boolean

Returns:



22
23
24
# File 'lib/socialcastr.rb', line 22

def ready?
  (ATTRIBUTES - [:config_file]).map { |a| self.send a }.map(&:nil?).none?
end

#resetObject



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