Module: WebFunction::Flaggable
Overview
A module that provides a flaggable interface. Flags are used to define the behavior of an object.
Instance Attribute Summary collapse
-
#flags ⇒ Array<String>
readonly
List of flags.
Instance Method Summary collapse
-
#flag?(flag) ⇒ Boolean
Whether the endpoint declares the given flag.
Instance Attribute Details
#flags ⇒ Array<String> (readonly)
List of flags. See the [available flags section] on the Web Function website for a complete list of flags available.
28 29 30 |
# File 'lib/web_function/flaggable.rb', line 28 def flags @flags end |
Instance Method Details
#flag?(flag) ⇒ Boolean
Whether the endpoint declares the given flag.
36 37 38 |
# File 'lib/web_function/flaggable.rb', line 36 def flag?(flag) @flags.include?(flag) end |