module Xumlidot::Diagram::Xmi::ID
Helper - everything needs an id and these ids need to be used in the Element section
Public Instance Methods
association_end_id()
click to toggle source
# File lib/xumlidot/diagram/xmi/id.rb, line 27 def association_end_id @association_end_id ||= "#{new_id[0..5]}.#{new_id[0..5]}".upcase end
association_id()
click to toggle source
# File lib/xumlidot/diagram/xmi/id.rb, line 23 def association_id @association_id ||= "#{new_id[0..5]}.#{new_id[0..5]}".upcase end
force_id(id)
click to toggle source
# File lib/xumlidot/diagram/xmi/id.rb, line 15 def force_id(id) @_id = id end
gen_id()
click to toggle source
# File lib/xumlidot/diagram/xmi/id.rb, line 19 def gen_id @gen_id ||= "#{new_id[0..5]}.#{new_id[0..5]}".upcase end
id()
click to toggle source
# File lib/xumlidot/diagram/xmi/id.rb, line 11 def id @_id ||= new_id end
Private Instance Methods
new_id()
click to toggle source
# File lib/xumlidot/diagram/xmi/id.rb, line 33 def new_id SecureRandom.hex end