Module: Riml::NotNestedUnder
Instance Method Summary collapse
- #non_nested?(klass = not_nested_under_class) ⇒ Boolean
-
#not_nested_under_class ⇒ Object
override if applicable.
Instance Method Details
#non_nested?(klass = not_nested_under_class) ⇒ Boolean
147 148 149 150 151 152 153 |
# File 'lib/nodes.rb', line 147 def non_nested?(klass = not_nested_under_class) n = self while (n = n.parent) != nil return false if n.is_a?(klass) end true end |
#not_nested_under_class ⇒ Object
override if applicable
156 157 158 |
# File 'lib/nodes.rb', line 156 def not_nested_under_class self.class end |