Class: Flags::BoolFlag

Inherits:
Flag
  • Object
show all
Defined in:
lib/flags.rb

Overview

A flag with a boolean value.

Instance Attribute Summary

Attributes inherited from Flag

#default_value, #definition_file, #description, #is_explicit, #name, #type, #value

Instance Method Summary collapse

Methods inherited from Flag

#add_validator, #default?, #restore_default

Constructor Details

#initialize(name, default_value, description, definition_file) ⇒ BoolFlag

Returns a new instance of BoolFlag.



522
523
524
525
# File 'lib/flags.rb', line 522

def initialize(name, default_value, description, definition_file)
  super(:bool, name, default_value, description, definition_file,
      [ClassValidator.new(TrueClass, FalseClass)])
end