Class: MimiCheck::Generator::Wrapper
- Inherits:
-
Object
- Object
- MimiCheck::Generator::Wrapper
- Includes:
- MimiCheck::Generator
- Defined in:
- lib/mimicheck/generator/wrapper.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(element) ⇒ Wrapper
constructor
A new instance of Wrapper.
Methods included from MimiCheck::Generator
Constructor Details
#initialize(element) ⇒ Wrapper
Returns a new instance of Wrapper.
6 7 8 |
# File 'lib/mimicheck/generator/wrapper.rb', line 6 def initialize(element) @element = element end |
Instance Method Details
#generate ⇒ Object
12 13 14 15 |
# File 'lib/mimicheck/generator/wrapper.rb', line 12 def generate return element unless element.respond_to?(:call) element.call end |