Module: Tonal::IRBHelpers
- Defined in:
- lib/tonal/irb_helpers.rb
Instance Method Summary collapse
-
#i(*args, reduced: true) ⇒ Tonal::Interval
The interval between the given args.
-
#r(arg1, arg2 = nil) ⇒ Tonal::Ratio
An unreduced ratio.
-
#rr(arg1, arg2 = nil) ⇒ Tonal::ReducedRatio
A reduced ratio.
Instance Method Details
#i(*args, reduced: true) ⇒ Tonal::Interval
Returns the interval between the given args.
29 30 31 |
# File 'lib/tonal/irb_helpers.rb', line 29 def i(*args, reduced: true) Tonal::Interval.new(*args, reduced:) end |
#r(arg1, arg2 = nil) ⇒ Tonal::Ratio
Returns an unreduced ratio.
9 10 11 |
# File 'lib/tonal/irb_helpers.rb', line 9 def r(arg1, arg2=nil) Tonal::Ratio.new(arg1, arg2) end |
#rr(arg1, arg2 = nil) ⇒ Tonal::ReducedRatio
Returns a reduced ratio.
19 20 21 |
# File 'lib/tonal/irb_helpers.rb', line 19 def rr(arg1, arg2=nil) Tonal::ReducedRatio.new(arg1, arg2) end |