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
61 62 63 64 65 66 67 |
# File 'lib/riml/nodes.rb', line 61 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
70 71 72 |
# File 'lib/riml/nodes.rb', line 70 def not_nested_under_class self.class end |