Fastfwd v0.1.0 Fastfwd.Module View Source
Interact with individual Fastfwd-compatible modules - check for tags, behaviours, and so on.
Link to this section Summary
Functions
Does a module have the specified behaviour?
Does a tag exist for a module?
Does a module have support tags?
Finds all tags for a module
Link to this section Functions
Link to this function
has_behaviour?(module, behaviour) View Source
Does a module have the specified behaviour?
Returns true or false.
Examples
iex> Fastfwd.Module.has_behaviour?(Icecream.Spoon, Fastfwd.Behaviours.Receiver)
false
Link to this function
has_tag?(module, tag) View Source
Does a tag exist for a module?
Returns true or false.
It's possible for a module to have a tag yet and not be the selected module for that tag, as it's possible for modules to share a tag - they are not unique.
Examples
iex> Fastfwd.Module.has_tag?(Icecream.DoubleChocolate, :chocolate)
true
Link to this function
tagged?(module) View Source
Does a module have support tags?
Returns true or false.
Examples
iex> Fastfwd.Module.tagged?(Icecream.Spoon)
false
iex> Fastfwd.Module.tagged?(Icecream.Chocolate)
true
Link to this function
tags(module) View Source
Finds all tags for a module
Returns a list of atoms if any tags are found, otherwise it returns an empty list.
Examples
iex> Fastfwd.Module.tags(Icecream.DoubleChocolate)
[:chocolate, :double_chocolate]