Module: SpotifyExporter::Injectable::ClassMethods
- Defined in:
- lib/spotifyexporter/lib/injectable.rb
Instance Method Summary collapse
-
#inject(name, source) ⇒ Object
Dynamically defines a private method in the included class.
Instance Method Details
#inject(name, source) ⇒ Object
Dynamically defines a private method in the included class
11 12 13 14 |
# File 'lib/spotifyexporter/lib/injectable.rb', line 11 def inject(name, source) define_method(name.to_sym) { source.call } private name.to_sym end |