Sha256: 13a179dfda52db7b2b160d7f7aba6bea14ce9434da8f6c290c18d3db5e3a6a5d

Contents?: true

Size: 369 Bytes

Versions: 1

Compression:

Stored size: 369 Bytes

Contents

module Compel
  module Builder

    class Schema

      include Builder::Common

      attr_reader :type,
                  :options

      def initialize(type)
        @type = type
        @options = Hashie::Mash.new
      end

      def required?
        !!options[:required]
      end

      def default_value
        options[:default]
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
compel-0.2.0 lib/compel/builder/schema.rb