class PDF::Name
- PDF::Name
- Reference
- Object
Included Modules
Defined in:
pdf/obj/name.crpdf/obj/obj.cr
Constructors
Class Method Summary
-
.format(io : IO, str : String) : IO
This syntax is required in order to represent any of the delimiter or white-space characters or the number sign character itself; it is recommended but not required for characters whose codes are outside the range 33 (!) to 126 (~)
Instance Method Summary
- #inner : String
- #inner=(inner : String)
-
#render_to_pdf(io : IO) : IO
render your data into a pdf file , and return the rendered IO
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
-
#to_s
This syntax is required in order to represent any of the delimiter or white-space characters or the number sign character itself; it is recommended but not required for characters whose codes are outside the range 33 (!) to 126 (~)
Macro Summary
-
sym_cases(source, *namesyms)
It's helpful in binding enums with
Names
from its symbol.
Instance methods inherited from module PDF::Renderable
render_to_pdf(io : IO) : IO
render_to_pdf
Constructor Detail
Class Method Detail
This syntax is required in order to represent any of the delimiter or white-space characters or the number sign character itself; it is recommended but not required for characters whose codes are outside the range 33 (!) to 126 (~)
Instance Method Detail
render your data into a pdf file , and return the rendered IO
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
This syntax is required in order to represent any of the delimiter or white-space characters or the number sign character itself; it is recommended but not required for characters whose codes are outside the range 33 (!) to 126 (~)
Macro Detail
It's helpful in binding enums with Names
from its symbol.
An example from this can be seen from PDF::Catalog::PageLayout#to_name
:
Name.symcases( self,SinglePage,OneColumn,TwoColumnLeft, TwoColumnRight)
#expand to
case self
when SinglePage then Name.new("SinglePage")
when OneColumn then Name.new("OneColumn")
when TwoColumnLeft then Name.new("TwoColumnLeft")
when TwoColumnRight then Name.new("TwoColumnRight")
end