Sha256: dd54e2c7d597312525d13e04b34e9031355be836528d15fdb1e001cb89eb1dce
Contents?: true
Size: 752 Bytes
Versions: 135
Compression:
Stored size: 752 Bytes
Contents
require "expressir/express/model_element" module Expressir module Express class UniqueRule < ModelElement attr_accessor :name, :attributes def initialize(options) @name = nil @attributes = [] @options = options end def parse document = @options.fetch(:document, nil) extract_unique_attributes(document) self end def self.parse(document) new(document: document).parse end private def extract_unique_attributes(document) @name = document.attributes["label"].to_s @attributes = document.xpath("unique.attribute").map do |attribute| attribute.attributes["attribute"] end end end end end
Version data entries
135 entries across 135 versions & 1 rubygems