Sha256: 447f85e0c4444d5b3cd670c1d3df2133633f7ea7b638f4b7b0011fade8cc82b8

Contents?: true

Size: 405 Bytes

Versions: 2

Compression:

Stored size: 405 Bytes

Contents

module WannabeBool::Configuration
  def invalid_value_behaviour=(behaviour)
    raise ArgumentError, 'behaviour does not respond to call method' unless behaviour.respond_to?(:call)

    @invalid_value_behaviour = behaviour
  end

  def invalid_value_behaviour
    @invalid_value_behaviour ||= WannabeBool::InvalidValueBehaviour::False
  end
end

module WannabeBool
  extend WannabeBool::Configuration
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wannabe_bool-0.7.0 lib/wannabe_bool/configuration.rb
wannabe_bool-0.6.0 lib/wannabe_bool/configuration.rb