Module: Undies
- Defined in:
- lib/undies.rb,
lib/undies/io.rb,
lib/undies/api.rb,
lib/undies/raw.rb,
lib/undies/source.rb,
lib/undies/element.rb,
lib/undies/version.rb,
lib/undies/template.rb,
lib/undies/root_node.rb,
lib/undies/element_node.rb
Defined Under Namespace
Modules: API, Element Classes: ElementAPIError, ElementNode, IO, NamedSource, Raw, RootAPIError, RootNode, Source, SourceStack, Template
Constant Summary collapse
- VERSION =
"3.1.0"
Class Method Summary collapse
- .named_source(name, *args, &block) ⇒ Object
-
.named_sources ⇒ Object
singleton accessors for named sources.
- .source(name) ⇒ Object
Class Method Details
.named_source(name, *args, &block) ⇒ Object
108 109 110 111 112 113 114 |
# File 'lib/undies/source.rb', line 108 def self.named_source(name, *args, &block) if args.empty? && block.nil? self.named_sources[name] else self.named_sources[name] = Undies::NamedSource.new(*args, &block) end end |
.named_sources ⇒ Object
singleton accessors for named sources
104 105 106 |
# File 'lib/undies/source.rb', line 104 def self.named_sources @@sources ||= {} end |