module Dcf
Public Class Methods
parse(input)
click to toggle source
@param [String] input @return [Array, nil] An array of { attr => val } hashes or nil if failure
# File lib/dcf.rb, line 8 def self.parse(input) parse = DcfParser.new.parse(input) return if parse.nil? parse.elements.collect do |i| paragraph = {} i.paragraph.elements.each do |row| paragraph[row.field.attribute.text_value] = row.field.value.text_value end paragraph end end
version()
click to toggle source
# File lib/dcf.rb, line 21 def self.version "0.2.1" end