Module: BEL::Gen::Statement
Overview
The Statement module defines methods that generate random BEL statements.
Constant Summary collapse
- RELATIONSHIPS =
Array of all BEL 1.0 relationships including both short and long form.
BEL::Language::RELATIONSHIPS.each.to_a.flatten.sort.uniq
Constants included from Term
Constants included from Namespace
Instance Method Summary collapse
-
#bel_statement ⇒ String
Returns a randomly constructed BEL statement.
-
#relationship ⇒ Symbol
Returns a randomly chosen relationship.
Methods included from Term
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_statement ⇒ String
Returns a randomly constructed BEL statement.
26 27 28 29 30 |
# File 'lib/bel/gen/statement.rb', line 26 def bel_statement sub = bel_term obj = bel_term "#{sub} #{relationship} #{obj}" end |
#relationship ⇒ Symbol
Returns a randomly chosen relationship.
18 19 20 21 22 |
# File 'lib/bel/gen/statement.rb', line 18 def relationship Rantly { choose(*RELATIONSHIPS) } end |