class Toast::ConfigDSL::Settings

Public Instance Methods

authenticate(&block) click to toggle source
# File lib/toast/config_dsl/settings.rb, line 32
def authenticate &block
  Toast.settings.authenticate = block
end
link_unlink_via_post(boolean) click to toggle source
# File lib/toast/config_dsl/settings.rb, line 28
def link_unlink_via_post boolean
  Toast.settings.link_unlink_via_post = boolean
end
max_window(size) click to toggle source
# File lib/toast/config_dsl/settings.rb, line 18
def max_window size
  if size.is_a?(Integer) and size > 0
    Toast.settings.max_window = size
  elsif size == :unlimited
    Toast.settings.max_window = 10**6 # yes that's inifinity
  else
    raise_config_error 'max_window must a positive integer or :unlimited'
  end
end
toast_settings(&block) click to toggle source
# File lib/toast/config_dsl/settings.rb, line 12
def toast_settings &block
  stack_push 'toast_settings' do
    self.instance_eval &block
  end
end