Module: Uniword::Wordprocessingml::RunProperties::Predicates
- Included in:
- Uniword::Wordprocessingml::RunProperties
- Defined in:
- lib/uniword/wordprocessingml/run_properties/predicates.rb
Overview
Boolean predicate methods for RunProperties.
Unwraps boolean property objects and returns true/false.
Instance Method Summary collapse
- #all_caps ⇒ Object
- #bold? ⇒ Boolean
- #caps? ⇒ Boolean
- #emboss? ⇒ Boolean
- #hidden? ⇒ Boolean
- #imprint? ⇒ Boolean
- #italic? ⇒ Boolean
- #outline? ⇒ Boolean
- #shadow? ⇒ Boolean
- #small_caps? ⇒ Boolean
- #strike? ⇒ Boolean
Instance Method Details
#all_caps ⇒ Object
34 35 36 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 34 def all_caps caps? end |
#bold? ⇒ Boolean
10 11 12 13 14 15 16 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 10 def bold? val = bold return false if val.nil? val = val.value if val.is_a?(Uniword::Properties::BooleanElement) val == true end |
#caps? ⇒ Boolean
38 39 40 41 42 43 44 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 38 def caps? val = caps return false if val.nil? val = val.value if val.is_a?(Uniword::Properties::BooleanElement) val == true end |
#emboss? ⇒ Boolean
70 71 72 73 74 75 76 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 70 def emboss? val = emboss return false if val.nil? val = val.value if val.is_a?(Properties::Emboss) val == true end |
#hidden? ⇒ Boolean
78 79 80 81 82 83 84 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 78 def hidden? val = hidden return false if val.nil? val = val.value if val.is_a?(Properties::Vanish) val == true end |
#imprint? ⇒ Boolean
62 63 64 65 66 67 68 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 62 def imprint? val = imprint return false if val.nil? val = val.value if val.is_a?(Properties::Imprint) val == true end |
#italic? ⇒ Boolean
18 19 20 21 22 23 24 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 18 def italic? val = italic return false if val.nil? val = val.value if val.is_a?(Uniword::Properties::BooleanElement) val == true end |
#outline? ⇒ Boolean
86 87 88 89 90 91 92 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 86 def outline? val = outline return false if val.nil? val = val.val if val.is_a?(Properties::Outline) val != "false" end |
#shadow? ⇒ Boolean
54 55 56 57 58 59 60 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 54 def shadow? val = shadow return false if val.nil? val = val.value if val.is_a?(Properties::Shadow) val == true end |
#small_caps? ⇒ Boolean
46 47 48 49 50 51 52 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 46 def small_caps? val = small_caps return false if val.nil? val = val.value if val.is_a?(Properties::SmallCaps) val == true end |
#strike? ⇒ Boolean
26 27 28 29 30 31 32 |
# File 'lib/uniword/wordprocessingml/run_properties/predicates.rb', line 26 def strike? val = strike return false if val.nil? val = val.value if val.is_a?(Uniword::Properties::BooleanElement) val == true end |