Class: Pismo::Reader::Document

Inherits:
Object
  • Object
show all
Defined in:
lib/pismo/reader.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) create(raw_content, options = {})



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/pismo/reader.rb', line 5

def self.create(raw_content, options = {})
  type = options.delete(:reader)
  case type
  when :score
    Pismo::Reader::Tree.new(raw_content, options)
  when :cluster
    Pismo::Reader::Cluster.new(raw_content, options)
  else
    Pismo::Reader::Tree.new(raw_content, options)
  end
end