Module: BEL::Gen::Term
Overview
Constant Summary collapse
- FUNCTIONS =
Array of all BEL 1.0 functions including both short and long form.
BEL::Language::FUNCTIONS.map { |_, fx| [ fx[:short_form], fx[:long_form] ] }.flatten.sort.uniq
Constants included from Namespace
Instance Method Summary collapse
-
#bel_term ⇒ String
Returns a randomly constructed BEL term.
-
#function ⇒ Symbol
Returns a randomly chosen function.
Methods included from Parameter
#bel_parameter, #bel_parameter_with_namespace, #bel_parameter_without_namespace
Methods included from Namespace
#namespace, #referenced_namespaces
Instance Method Details
#bel_term ⇒ String
Returns a randomly constructed BEL term.
28 29 30 |
# File 'lib/bel/gen/term.rb', line 28 def bel_term "#{function}(#{bel_parameter})" end |
#function ⇒ Symbol
Returns a randomly chosen function.
20 21 22 23 24 |
# File 'lib/bel/gen/term.rb', line 20 def function Rantly { choose(*FUNCTIONS) } end |