Module: Invisible
- Defined in:
- lib/invisible.rb,
lib/invisible/version.rb
Constant Summary collapse
- VERSION =
"0.2.2"
Instance Method Summary collapse
-
#append_features(base) ⇒ Object
Extend any module with
Invisible
and any methods the module overrides will maintain their original visibility. - #prepend_features(base) ⇒ Object
Instance Method Details
#append_features(base) ⇒ Object
Extend any module with Invisible
and any methods the module overrides will maintain their original visibility.
70 71 72 |
# File 'lib/invisible.rb', line 70 def append_features(base) sync_visibility(base) { super } end |
#prepend_features(base) ⇒ Object
74 75 76 77 78 79 80 81 |
# File 'lib/invisible.rb', line 74 def prepend_features(base) return super if invisible sync_visibility(base, mod = dup) mod.invisible = true base.const_set("Invisible#{name}", mod) if base.name && name base.prepend mod end |