Module: LLT::Helpers::Functions
- Defined in:
- lib/llt/helpers/functions.rb
Instance Method Summary collapse
-
#has_f?(function) ⇒ Boolean
Shortcut methods.
-
#has_function?(function) ⇒ Boolean
Objects that use this module must implement #functions, which shall respond to #include?.
- #has_not_function?(function) ⇒ Boolean (also: #has_not_f?)
Instance Method Details
#has_f?(function) ⇒ Boolean
Shortcut methods
16 17 18 19 20 21 22 |
# File 'lib/llt/helpers/functions.rb', line 16 def has_f?(function) # Do not alias or delegate. # # It's (slightly) faster that way and this method will usually # get lots of calls. functions.include?(function) end |
#has_function?(function) ⇒ Boolean
Objects that use this module must implement #functions, which shall respond to #include?
7 8 9 |
# File 'lib/llt/helpers/functions.rb', line 7 def has_function?(function) functions.include?(function) end |
#has_not_function?(function) ⇒ Boolean Also known as: has_not_f?
11 12 13 |
# File 'lib/llt/helpers/functions.rb', line 11 def has_not_function? function ! has_function?(function) end |