Sha256: 822942c14d8226bd37b433d6a571553198fc34db67665c4ced2c0546c94ef2c8

Contents?: true

Size: 187 Bytes

Versions: 3

Compression:

Stored size: 187 Bytes

Contents

module Subduino
  module Parse
    class Bool < Digital
      def parse
        @v.zero? ? false : true
      end

      def to_s
        parse ? "ON" : "OFF"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
subduino-0.5.0 lib/subduino/parse/bool.rb
subduino-0.3.1 lib/subduino/parse/bool.rb
subduino-0.2.2 lib/subduino/parse/bool.rb