Sha256: f87c7e57380c93590942885b08eb197efbaea3d7c16c283cddd227b6d7a5e11f

Contents?: true

Size: 532 Bytes

Versions: 2

Compression:

Stored size: 532 Bytes

Contents

class Tarquinn::Config
  attr_accessor :redirect

  def initialize(redirect)
    @redirect = redirect
  end

  def add_redirection_rules(*methods, &block)
    self.methods.concat methods
    blocks << block if block_given?
  end

  def add_skip_rules(*methods, &block)
    skip_methods.concat methods
    skip_blocks << block if block_given?
  end

  def methods
    @methods ||= []
  end

  def skip_methods
    @skip_methods ||= []
  end

  def blocks
    @blocks ||= []
  end

  def skip_blocks
    @skip_blocks ||= []
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tarquinn-0.0.2 lib/tarquinn/config.rb
tarquinn-0.0.1 lib/tarquinn/config.rb