Sha256: b95c4c5662b33841e5a134f292c0a897ea257969ac8f5f4df64df7fe6835f69e
Contents?: true
Size: 909 Bytes
Versions: 135
Compression:
Stored size: 909 Bytes
Contents
module Expressir module Express class AggregateDimension attr_accessor :aggrtype, :lower, :upper, :isUnique, :isOptionalArray def initialize(options = {}) @aggrtype = "SET" @lower = "0" @upper = "?" @isUnique = false @isOptionalArray = false @options = options end def parse document = @options.fetch(:document, nil) extract_attributes(document) if document self end def self.parse(document) new(document: document).parse end private def extract_attributes(document) @aggrtype = document.attributes["type"] @lower = document.attributes["lower"] @upper = document.attributes["upper"] @isUnique = document.attributes["unique"] == "YES" @isOptionalArray = document.attributes["optional"] == "YES" end end end end
Version data entries
135 entries across 135 versions & 1 rubygems