class PDF::Name

Included Modules

Defined in:

pdf/obj/name.cr
pdf/obj/obj.cr

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Instance methods inherited from module PDF::Renderable

render_to_pdf(io : IO) : IO render_to_pdf

Constructor Detail

def self.new(value : String) #

[View source]

Class Method Detail

def self.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 (~)


[View source]

Instance Method Detail

def inner : String #

[View source]
def inner=(inner : String) #

[View source]
def render_to_pdf(io : IO) : IO #
Description copied from module PDF::Renderable

render your data into a pdf file , and return the rendered IO


[View source]
def to_s(io : IO) #
Description copied from class Reference

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>

[View source]
def 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 (~)


[View source]

Macro Detail

macro sym_cases(source, *namesyms) #

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

[View source]