Class: Pdfrb::Model::Type::Namespace
Overview
Namespace dictionary (s14.7.6.1, PDF 2.0). Namespaces for
structure element types in tagged PDF documents.
Instance Attribute Summary
Attributes inherited from Object
#document, #gen, #oid, #value
Instance Method Summary
collapse
#[], #[]=, arlington_available?, arlington_default, arlington_key_to_symbol, arlington_loaded_for?, arlington_mark_loaded, arlington_object, arlington_one_type_to_ruby, arlington_required?, arlington_types_to_ruby, arlington_version, define_field, define_field_from_arlington, #delete, #each, each_field, #each_raw, #empty?, field, #initialize, #key?, #keys, lookup_type, own_fields, #pdf_type, register_type, type_map, #validate
Methods inherited from Object
#==, define_type, #deref, #indirect?, #initialize, #must_be_indirect?, #pdf_type, pdf_type
Instance Method Details
#has_role_map? ⇒ Boolean
15
16
17
|
# File 'lib/pdfrb/model/type/namespace.rb', line 15
def has_role_map?
!!role_map_ns
end
|
#mapped_role(custom_name) ⇒ Object
19
20
21
22
23
|
# File 'lib/pdfrb/model/type/namespace.rb', line 19
def mapped_role(custom_name)
return nil unless role_map_ns.is_a?(Hash)
role_map_ns[custom_name.to_sym] || role_map_ns[custom_name.to_s]
end
|
#namespace_name ⇒ Object
12
|
# File 'lib/pdfrb/model/type/namespace.rb', line 12
def namespace_name; self[:NS]; end
|
#role_map_ns ⇒ Object
13
|
# File 'lib/pdfrb/model/type/namespace.rb', line 13
def role_map_ns; self[:RoleMapNS]; end
|
11
|
# File 'lib/pdfrb/model/type/namespace.rb', line 11
def type; self[:Type]; end
|