Module: Tins::Blank::Array
- Defined in:
- lib/tins/xt/blank.rb
Overview
Blank behavior for Array instances
Arrays are blank if they are empty. This implementation aliases the ‘empty?` method to `blank?`.
Class Method Summary collapse
-
.included(modul) ⇒ Object
The included method is a hook that gets called when this module is included in another class or module.
Class Method Details
.included(modul) ⇒ Object
The included method is a hook that gets called when this module is included in another class or module.
It sets up blank? behavior by aliasing the empty? method to blank? in the including class/module.
81 82 83 84 85 |
# File 'lib/tins/xt/blank.rb', line 81 def self.included(modul) modul.module_eval do alias_method :blank?, :empty? end end |