Module: Parameterization
- Included in:
- Duxml::Element
- Defined in:
- lib/re_dux/element/parameterization.rb
Overview
methods to extend Dux::Object with methods needed to process parameterized XML content
Instance Method Summary collapse
-
#if=(condition) ⇒ Object
changes condition of this object’s existence.
-
#if? ⇒ Boolean
returns true if self is true or indeterminate (because condition is currently parameterized) returns false otherwise i.e.
Instance Method Details
#if=(condition) ⇒ Object
changes condition of this object’s existence
13 14 15 16 |
# File 'lib/re_dux/element/parameterization.rb', line 13 def if=(condition) # check for valid conditional change_attr_value :if, condition end |
#if? ⇒ Boolean
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
7 8 9 10 |
# File 'lib/re_dux/element/parameterization.rb', line 7 def if? return true unless (if_str = xml[:if]) if_str.parameterized? || if_str == 'true' ? true : false end |