Sha256: 0cba42dcc23303cbc670c6bbef40611a0ffe62241073d48d2253e815a1ee27b4

Contents?: true

Size: 891 Bytes

Versions: 19

Compression:

Stored size: 891 Bytes

Contents

module Nucleon
module Plugin
class Translator < Base

  #-----------------------------------------------------------------------------
  # Translator plugin interface
  
  #-----------------------------------------------------------------------------
  # Property accessor / modifiers

  #-----------------------------------------------------------------------------
  # Operations
  
  def parse(raw)
    logger.debug("Parsing raw data: #{raw}")
    
    properties = {}
    properties = yield(properties) if block_given?
    
    logger.debug("Completed parsing data: #{properties.inspect}")
    return properties
  end
  
  #---
  
  def generate(properties)
    logger.debug("Generating output data: #{properties.inspect}")
    
    output = ''
    output = yield(output) if block_given?
    
    logger.debug("Completed generating data: #{output}")
    return output
  end
end
end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
nucleon-0.1.19 lib/core/plugin/translator.rb
nucleon-0.1.18 lib/core/plugin/translator.rb
nucleon-0.1.17 lib/core/plugin/translator.rb
nucleon-0.1.16 lib/core/plugin/translator.rb
nucleon-0.1.15 lib/core/plugin/translator.rb
nucleon-0.1.14 lib/core/plugin/translator.rb
nucleon-0.1.13 lib/core/plugin/translator.rb
nucleon-0.1.12 lib/core/plugin/translator.rb
nucleon-0.1.11 lib/core/plugin/translator.rb
nucleon-0.1.10 lib/core/plugin/translator.rb
nucleon-0.1.9 lib/core/plugin/translator.rb
nucleon-0.1.8 lib/core/plugin/translator.rb
nucleon-0.1.7 lib/core/plugin/translator.rb
nucleon-0.1.6 lib/core/plugin/translator.rb
nucleon-0.1.5 lib/core/plugin/translator.rb
nucleon-0.1.4 lib/core/plugin/translator.rb
nucleon-0.1.3 lib/core/plugin/translator.rb
nucleon-0.1.2 lib/core/plugin/translator.rb
nucleon-0.1.1 lib/core/plugin/translator.rb