module Parameterization

methods to extend Dux::Object with methods needed to process parameterized XML content

Public Instance Methods

if=(condition) click to toggle source

changes condition of this object's existence

# File lib/re_duxml/element/parameterization.rb, line 14
def if=(condition)
  # check for valid conditional
  change_attr_value :if, condition
end
if?() click to toggle source

returns true if self is true or indeterminate (because condition is currently parameterized) returns false otherwise i.e. this node does not exist in this design build

# File lib/re_duxml/element/parameterization.rb, line 8
def if?
  return true unless (if_str = self[:if])
  if_str.parameterized? || if_str == 'true' ? true : false
end