Module: Cooltrainer::DistorteD
- Defined in:
- lib/distorted/floor.rb,
lib/distorted/version.rb,
lib/distorted/click_again.rb,
lib/distorted/media_molecule.rb,
lib/distorted/media_molecule/pdf.rb,
lib/distorted/media_molecule/svg.rb,
lib/distorted/media_molecule/font.rb,
lib/distorted/media_molecule/text.rb,
lib/distorted/media_molecule/image.rb,
lib/distorted/media_molecule/video.rb,
lib/distorted/modular_technology/vips.rb,
lib/distorted/modular_technology/pango.rb,
lib/distorted/modular_technology/ttfunk.rb,
lib/distorted/modular_technology/gstreamer.rb,
lib/distorted/modular_technology/vips/load.rb,
lib/distorted/modular_technology/vips/save.rb,
lib/distorted/modular_technology/vips/foreign.rb
Defined Under Namespace
Modules: Invoker, Molecule, Technology Classes: ClickAgain, Floor, KEY
Constant Summary collapse
- VERSION =
TripleCounter.new(0, 7, 0)
Class Method Summary collapse
-
.IMPLANTATION(constant, corpus = self.media_molecules) ⇒ Object
Generic entry-point for attribute-collation of a given constant over a given Molecule or Enumerable of Molecules.
-
.media_molecules ⇒ Object
Returns a Set of our discovered MediaMolecules.
Class Method Details
.IMPLANTATION(constant, corpus = self.media_molecules) ⇒ Object
Generic entry-point for attribute-collation of a given constant over a given Molecule or Enumerable of Molecules.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/distorted/media_molecule.rb', line 47 def self.IMPLANTATION(constant, corpus = self.media_molecules) (corpus.is_a?(Enumerable) ? corpus : Array[corpus]).map { |molecule| KEY.new(molecule, constant) }.each_with_object(Hash[]) { |key, piles| # Hash#slice doesn't trigger the default_proc, so access each directly. piles.store(key, @@implantation[key]) }.yield_self { |piles| # Return just the data when we were given a single Molecule to search. corpus.is_a?(Enumerable) ? piles : piles.shift[1] } end |
.media_molecules ⇒ Object
Returns a Set of our discovered MediaMolecules.
14 15 16 17 18 |
# File 'lib/distorted/media_molecule.rb', line 14 def self.media_molecules Cooltrainer::DistorteD::Molecule.constants.map { |molecule| Cooltrainer::DistorteD::Molecule::const_get(molecule) }.to_set end |