class Gossiper::Configuration

Public Class Methods

attribute(name, default_value = nil) click to toggle source
# File lib/gossiper/configuration.rb, line 5
def attribute(name, default_value = nil)
  define_method name do
    instance_variable_get("@#{name}") || default_value
  end

  define_method "#{name}=" do |value|
    instance_variable_set("@#{name}", value.to_s)
  end
end

Public Instance Methods

authorize_with(&block) click to toggle source
# File lib/gossiper/configuration.rb, line 26
def authorize_with(&block)
  if block_given?
    @authorize_with = block
  end
  @authorize_with ||= Proc.new {}
end