Sha256: 9acf78a66cc6cbcffd4175c4afdf3ba7806c6372478849c0154365bb4821f9d4
Contents?: true
Size: 270 Bytes
Versions: 1
Compression:
Stored size: 270 Bytes
Contents
module Iz class Binary REGEX = /^[01]+$/ attr_accessor :value def initialize(binary) self.value = binary end def valid? Iz::Binary.is_binary?(value) end def self.is_binary?(value) value.to_s =~ REGEX end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
iz-0.0.1 | lib/iz/binary.rb |