Class: Vissen::Parameterized::Value::Bool

Inherits:
Object
  • Object
show all
Includes:
Vissen::Parameterized::Value
Defined in:
lib/vissen/parameterized/value/bool.rb

Overview

Bool values are stored as booleans internally.

Usage

bool = Bool.new true
bool.value # => true

Constant Summary collapse

DEFAULT =

Returns see Value.

Returns:

  • (true, false)

    see Value

false

Instance Attribute Summary

Attributes included from Vissen::Parameterized::Value

#value

Instance Method Summary collapse

Methods included from Vissen::Parameterized::Value

canonicalize, #initialize, #scope, #tainted?, #to_s, types, #untaint!

Instance Method Details

#write(new_value) ⇒ Object

Returns see Value#write.

Parameters:

  • new_value (Object)

    the new value.

Returns:

  • see Value#write



21
22
23
# File 'lib/vissen/parameterized/value/bool.rb', line 21

def write(new_value)
  super new_value ? true : false
end