Sha256: 0173d6c0be645bebbe48deb9b6718ab1ec468bc604cbdd225071ed843b61d768
Contents?: true
Size: 525 Bytes
Versions: 36
Compression:
Stored size: 525 Bytes
Contents
module Videojuicer module Resource module Types class Base def self.load(value) return self.new(value) end def initialize(value) @raw = value end # Returns the source value attr_reader :raw end class Boolean < Base # Boolean.new("1").dump #=> true # Returns the coerced value def dump [1, "1", "true", "yes"].include?(raw) end end end end end
Version data entries
36 entries across 36 versions & 2 rubygems