Module: Idml::Parts

Defined in:
lib/idml/parts.rb,
lib/idml/parts/raw.rb,
lib/idml/parts/xmp.rb,
lib/idml/parts/tags.rb,
lib/idml/parts/fonts.rb,
lib/idml/parts/story.rb,
lib/idml/parts/style.rb,
lib/idml/parts/spread.rb,
lib/idml/parts/graphic.rb,
lib/idml/parts/mapping.rb,
lib/idml/parts/designmap.rb,
lib/idml/parts/preferences.rb,
lib/idml/parts/backing_story.rb,
lib/idml/parts/master_spread.rb,
lib/idml/parts/style_mapping.rb

Defined Under Namespace

Modules: Xmp Classes: BackingStory, Designmap, Fonts, Graphic, Mapping, MasterSpread, Preferences, Raw, Spread, Story, Style, StyleMapping, Tags, XmpDescription, XmpMeta, XmpRdf

Class Method Summary collapse

Class Method Details

.allObject



36
37
38
39
# File 'lib/idml/parts.rb', line 36

def all
  ensure_loaded
  @registry.values.uniq
end

.class_for(file_name) ⇒ Object



30
31
32
33
34
# File 'lib/idml/parts.rb', line 30

def class_for(file_name)
  ensure_loaded
  _, klass = @registry.find { |pattern, _| pattern.match?(file_name) }
  klass
end

.register(pattern, klass) ⇒ Object



26
27
28
# File 'lib/idml/parts.rb', line 26

def register(pattern, klass)
  @registry[pattern] = klass
end