Sha256: f677541e70a8de44e979266f239ae31547445241b0fb23a1882ae65c7605303e

Contents?: true

Size: 882 Bytes

Versions: 1

Compression:

Stored size: 882 Bytes

Contents

class XsdPopulator
	class Informer
    attr_reader :options

    def initialize(_opts = {})
      @options = _opts || {}
    end

    def skip?
      options[:skip] == true
    end

    def self.skip
      self.new(:skip => true)
    end

    def attributes
      options[:attributes] || {}
    end

    def attributes?
      self.options.keys.include?(:attributes)
    end

    def self.attributes(attrs)
      self.new(:attributes => attrs)
    end

    def namespace
      options[:namespace]
    end

    def namespace?
      options.keys.include?(:namespace)
    end

    def self.namespace(ns)
      self.new(:namespace => ns)
    end

    def content
      options[:content]
    end

    def content?
      self.options.keys.include?(:content)
    end

    def self.content(content)
      self.new(:content => content)
    end
  end # class Informer
end # module XsdPopulator

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xsd-populator-0.2.1 lib/informer.rb