Sha256: 05b5ebd24fb3343987c4a317d42834ad7e08eea6b4371fbcf8840599314e5b1d

Contents?: true

Size: 496 Bytes

Versions: 19

Compression:

Stored size: 496 Bytes

Contents

module Nucleon
module Translator
class Yaml < Plugin::Translator
   
  #-----------------------------------------------------------------------------
  # Translator operations
   
  def parse(yaml_text)
    return super do |properties|
      if yaml_text && ! yaml_text.empty?
        properties = Util::Data.parse_yaml(yaml_text)
      end
      properties
    end
  end
  
  #---
  
  def generate(properties)
    return super do
      Util::Data.to_yaml(properties)
    end
  end
end
end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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