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



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

def debug
  @debug ||= false
end

#formatObject



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

def format
  @format ||= 'xml'
end

#ready?Boolean

Returns:

  • (Boolean)


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

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

#resetObject



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