Class: Ldaptic::Syntaxes::Boolean

Inherits:
Abstract
  • Object
show all
Defined in:
lib/ldaptic/syntaxes.rb

Constant Summary

Constants inherited from Abstract

Abstract::PRINTABLE

Instance Method Summary collapse

Methods inherited from Abstract

format, #format, #initialize, parse, #printable?

Constructor Details

This class inherits a constructor from Ldaptic::Syntaxes::Abstract

Instance Method Details

#error(string) ⇒ Object



142
143
144
# File 'lib/ldaptic/syntaxes.rb', line 142

def error(string)
  "must be a boolean" unless %w(TRUE FALSE).include?(string)
end

#parse(string) ⇒ Object



138
139
140
# File 'lib/ldaptic/syntaxes.rb', line 138

def parse(string)
  string == "TRUE"
end