minidsl 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +48 -41
  3. data/lib/minidsl/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9a02d8c12ba969f4f18d553b8c59362c610a7fd
4
- data.tar.gz: 5215ed6b6ae4a2a4e6a552d35e7822a002f53fea
3
+ metadata.gz: d0b0b55326e59aca4041b6b913815834fd28e37a
4
+ data.tar.gz: 2e9ab4c8b8cf612daa346237c17defd2628a0055
5
5
  SHA512:
6
- metadata.gz: 780bb3208a0b4c9ec83859ad965d8c048e7378280975341fa8cf2a1fa9a1a4932787b38516b511011acb2aa16eebe39153333376a5ffb65fbeade42561dc95ce
7
- data.tar.gz: 80431c19857c1c62ccd01fb89e935b73c4dbb0f66d9dcd22d32a66cb8d704ad547e2110e65f66368ba40849ac0dd7f0422f67c6cae435eb98973f9272dbde654
6
+ metadata.gz: 2a69c0bd699d93f6df23327027b97f381500df0da3c2982bfb55539ea5b356ef393e47895e5d52500e6e87383d9efebf526c83fa82d67296ac23c7b3c9677305
7
+ data.tar.gz: 6fc397e298bd0487993e124e3c6381581c5e68fe618d8eef0172fd97cb7ab4d634dca7fed9fc6169121ecc4a8f25e864864fc2c530fcab6dc82c7259703eb832
data/README.md CHANGED
@@ -1,41 +1,48 @@
1
- # Minidsl
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/minidsl`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'minidsl'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install minidsl
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/minidsl.
36
-
37
-
38
- ## License
39
-
40
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
1
+ # Minidsl
2
+
3
+ Minidsl is an DSL way to generate mainly codes.
4
+
5
+ ```ruby
6
+ $: << "lib"
7
+ require 'minidsl'
8
+
9
+ include Minidsl
10
+ r = Scope.push_context :Writer
11
+
12
+
13
+ class Test
14
+ def int(opt = {})
15
+ opt.map{|k, v|
16
+ "int #{k} = #{v};"
17
+ }
18
+ end
19
+ def println(str)
20
+ "System.out.println(#{str.inspect});"
21
+ end
22
+ end
23
+
24
+ s = pure_proxy Test.new
25
+ s.instance_eval{
26
+ int a: 3, b: 5
27
+ println "Hello world"
28
+ }
29
+
30
+ puts r.result
31
+
32
+ ```
33
+ would generate
34
+
35
+ ```java
36
+ int a = 3;
37
+ int b = 5;
38
+ System.out.println("Hello world");
39
+ ```
40
+ ## Contributing
41
+
42
+ Bug reports and pull requests are welcome on GitHub at https://github.com/RGSS3/minidsl.
43
+
44
+
45
+ ## License
46
+
47
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
48
+
@@ -1,3 +1,3 @@
1
1
  module Minidsl
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minidsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artoria