Module: FlameChannelParser
- Defined in:
- lib/parser.rb,
lib/channel.rb,
lib/timewarp_extractor.rb,
lib/flame_channel_parser.rb,
lib/flame_channel_parser/version.rb
Defined Under Namespace
Modules: FramecurveWriters, Segments Classes: Builder, Channel, Extractor, Inspector, Interpolator, Key, Parser, TimewarpExtractor, XMLParser
Constant Summary collapse
- VERSION =
'4.1.1'
Class Method Summary collapse
-
.parse(io) ⇒ Object
Parse a Flame setup into an array of Channel objects.
-
.parse_file_at(path) ⇒ Object
Parse a Flame setup at passed path.
Class Method Details
.parse(io) ⇒ Object
Parse a Flame setup into an array of Channel objects. If a block is given to the method it will yield Channel objects one by one instead of accumulating them into an array (useful for big setups)
10 11 12 13 14 15 16 17 |
# File 'lib/flame_channel_parser.rb', line 10 def self.parse(io) c = get_parser_class(io) if block_given? c.new.parse(io, &Proc.new) else c.new.parse(io) end end |
.parse_file_at(path) ⇒ Object
Parse a Flame setup at passed path. Will return the channels instead of yielding them
20 21 22 |
# File 'lib/flame_channel_parser.rb', line 20 def self.parse_file_at(path) File.open(path, &method(:parse)) end |