Class: Okura::Serializer::Features::Marshal

Inherits:
Object
  • Object
show all
Defined in:
lib/okura/serializer.rb

Instance Method Summary collapse

Instance Method Details

#compile(input, output) ⇒ Object



128
129
130
131
132
133
134
135
136
# File 'lib/okura/serializer.rb', line 128

def compile(input,output)
  parser=Okura::Parser::Feature.new input
  features=Okura::Features.new
  parser.each{|id,text|
    features.add id,text
  }
  ::Marshal.dump(features,output)
  features
end

#load(io) ⇒ Object



137
138
139
# File 'lib/okura/serializer.rb', line 137

def load(io)
  ::Marshal.load(io)
end