Sha256: ca79e4657c8cf7216cd23d9f74f0946eef4e2e078775a377eea1d7a6f8dd7681

Contents?: true

Size: 283 Bytes

Versions: 1

Compression:

Stored size: 283 Bytes

Contents

class Code
  class Node
    class Base2Number
      def initialize(number)
        @number = number
      end

      def evaluate(context)
        ::Code::Object::Integer.new(number)
      end

      private

      def number
        @number.to_s.to_i(2)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
template-ruby-0.1.0 lib/code/node/base_2_number.rb