Sha256: 96582979eee19f2488671e624421b7209bf676063259f6a57f1b4ff45363475e

Contents?: true

Size: 356 Bytes

Versions: 1

Compression:

Stored size: 356 Bytes

Contents

module AnythingHub
  extend self

  class Config
    def method_missing(action, *args)
      if args.first
        instance_variable_set("@#{action.to_s}", args.first)
      else
        instance_variable_get("@#{action.to_s}")
      end
    end
  end

  def configure
    yield config
  end

  def config
    @config ||= AnythingHub::Config.new
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
anything-hub-0.0.1 lib/anything-hub/config.rb