Sha256: 1c18a1ff97cda111d45d96177d1b78e9752815ee69fd1f97a7b7826d992d93d6
Contents?: true
Size: 236 Bytes
Versions: 1
Compression:
Stored size: 236 Bytes
Contents
module Formatters class FormatBoolean < Format def initialize(options = {}) @on = 'yes' @off = 'no' end def from(value, options = {}) value ? @on : @off end def to(str, options = {}) str == @on end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
model_formatter-0.0.3 | lib/formatters/format_boolean.rb |