Module: Idml::Parts
- Defined in:
- lib/idml/parts.rb,
lib/idml/parts/raw.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
Classes: BackingStory, Designmap, Fonts, Graphic, Mapping, MasterSpread, Preferences, Raw, Spread, Story, Style, StyleMapping, Tags
Class Method Summary
collapse
Class Method Details
.all ⇒ Object
32
33
34
35
|
# File 'lib/idml/parts.rb', line 32
def all
ensure_loaded
@registry.values.uniq
end
|
.class_for(file_name) ⇒ Object
26
27
28
29
30
|
# File 'lib/idml/parts.rb', line 26
def class_for(file_name)
ensure_loaded
_, klass = @registry.find { |pattern, _| pattern.match?(file_name) }
klass
end
|
.register(pattern, klass) ⇒ Object
22
23
24
|
# File 'lib/idml/parts.rb', line 22
def register(pattern, klass)
@registry[pattern] = klass
end
|