struct
Components::SafeLength
- Components::SafeLength
- Struct
- Value
- Object
Overview
A validated CSS length. Rejects the string-passthrough hole entirely by only ever being constructed from a number + a fixed unit — there is no constructor that takes an arbitrary CSS length string.
Defined in:
components/safe/safe_style.crConstructors
- .percent(n : Number) : SafeLength
- .px(n : Number) : SafeLength
- .rem(n : Number) : SafeLength
- .zero : SafeLength
Instance Method Summary
-
#to_s(io : IO) : Nil
Same as
#inspect(io). -
#to_s : String
Returns a nicely readable and concise string representation of this object, typically intended for users.
Constructor Detail
Instance Method Detail
def to_s : String
#
Description copied from class Object
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.