Method: Rust::Formula#initialize
- Defined in:
- lib/rust/core/types/language.rb
#initialize(left_part, right_part) ⇒ Formula
Creates a new formula with a given left_part (optional) and right_part (as strings).
34 35 36 37 38 39 40 |
# File 'lib/rust/core/types/language.rb', line 34 def initialize(left_part, right_part) raise ArgumentError, "Expected string" if left_part && !left_part.is_a?(String) raise ArgumentError, "Expected string" if !right_part.is_a?(String) @left_part = left_part || "" @right_part = right_part end |