GithubHelp home page GithubHelp logo

solars / java-properties-for-ruby Goto Github PK

View Code? Open in Web Editor NEW

This project forked from peterseverin/java-properties-for-ruby

0.0 2.0 0.0 78 KB

A simple ruby gem to read/write Java properties files.

License: MIT License

java-properties-for-ruby's Introduction

= Java Properties Files in Ruby

I don't know if there's a real need for this, and if there is the jruby
people probably have it covered a lot better than I do. These classes
were mainly whipped up as an exercise in creating a ruby gem.

= JavaProperties::Properties

A class that can read and write to Java properties files that behaves
otherwise as a standard ruby Enumerable. The keys to this object can
be provided as Strings or Symbols, but internally they are Symbols.

  require 'rubygems'
  require 'java_properties'
  
  # Create a new object from a file
  props = JavaProperties::Properties.new("/path/to/file.properties")
  
  # Merge in another file
  props.load("/path/to/other/file.properties")
  
  # Behaves as an Enumerable
  props.each{ |key,value| puts "#{key} = #{value}" }

= properties2yaml

An executable script to convert an existing properties file to a YAML
file. There is no script to go the other way because not all YAML
files can be saved into a properties file. (That and I was feeling lazy.)
 
  Usage: properties2yaml [options] [INPUT] [OUTPUT]
  
  Options are:
  
      -s, --stdin  Read input from standard input instead of an input file
      -h, --help   Show this help message.

java-properties-for-ruby's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.