class DataBlock
Attributes
out[RW]
Public Class Methods
new( str, hash, script)
click to toggle source
# File lib/statsailr/block_builder/sts_block.rb, line 70 def initialize( str, hash, script) @out = str @opts = hash @script = script end
new_from_gram_node( node )
click to toggle source
# File lib/statsailr/block_builder/sts_block.rb, line 76 def self.new_from_gram_node( node ) out_df = type_adjust( node.e1.e1, node.e1.type ) data_hash = {} data_opts = node.e2 if ! data_opts.nil? data_opts.each(){|nd| data_opt_key = nd.e1 if(!nd.e2.nil?) data_opt_val = type_adjust( nd.e2.e1 , nd.e2.type ) else data_opt_val = nil end data_hash[data_opt_key] = data_opt_val } else data_opts = {} end data_script = type_adjust( node.e3.e1, node.e3.type ) return DataBlock.new( out_df , data_hash , data_script) end