class

Units::Scale

Inherits Comparable < Units::Compatible < Reference < Object

Constructors

new(function_code : String | ScaleFunction::FunctionSelection, value : Number | String, unit : String, search : Mode = Mode::PrimaryCode)
Source
new(value : BigDecimal, unit : Unit = Unit.new)
Source
new(value : BigDecimal, unit : String, mode : Mode = Mode::PrimaryCode)
Source
new(value : Number | String, unit : Unit = Unit.new)
Source
new(value : Number | String, unit : String, mode : Mode = Mode::PrimaryCode)
Source
new(function_code : String | ScaleFunction::FunctionSelection, value : Number | String, unit : Unit = Unit.new)

return a ScaleFunction version of scale

Source

Instance methods

atoms(*args, **options)
Source
atoms(*args, **options, &)
Source
depth
Source
inspect(io : IO) : Nil

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
Source
magnitude(scalar = scalar())
Source
mode
Source
root_terms
Source
scalar(magnitude = value)
Source
special?(*args, **options)
Source
special?(*args, **options, &)
Source
terms(*args, **options)
Source
terms(*args, **options, &)
Source
to_s(io, mode : Mode = @mode) : Nil
Source
unit
Source
value
Source