Class: Pdfrb::Document::Portfolio::Field

Inherits:
Struct
  • Object
show all
Defined in:
lib/pdfrb/document/portfolio.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



12
13
14
# File 'lib/pdfrb/document/portfolio.rb', line 12

def name
  @name
end

#orderObject

Returns the value of attribute order

Returns:

  • (Object)

    the current value of order



12
13
14
# File 'lib/pdfrb/document/portfolio.rb', line 12

def order
  @order
end

#subtypeObject

Returns the value of attribute subtype

Returns:

  • (Object)

    the current value of subtype



12
13
14
# File 'lib/pdfrb/document/portfolio.rb', line 12

def subtype
  @subtype
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



12
13
14
# File 'lib/pdfrb/document/portfolio.rb', line 12

def type
  @type
end

Instance Method Details

#pdf_hashObject



13
14
15
16
17
18
19
# File 'lib/pdfrb/document/portfolio.rb', line 13

def pdf_hash
  h = { N: name, T: type }
  h[:FT] = type unless type == :text
  h[:Subtype] = subtype if subtype
  h[:O] = order if order
  h
end