glimmer 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/glimmer.rb +1 -0
- data/lib/glimmer/dsl/engine.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a0e5867d64de61a6733bb4946eb3b366ae854a72bf99cdc048707c00cd9c276
|
4
|
+
data.tar.gz: b3735c7bff7ee61219f822378b59077e00f9957ed1031b09fd1e3f461eb90868
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5e181bff40082c4620fc6ad1a306af61c7d59e24a30c13c6038606f008d9480da5532d07a704d0c39563318c23935efb909f958f596b7c49c5f2a6843ace165
|
7
|
+
data.tar.gz: 0562d569471bb792943cac85d0c3a79462573074e1ad634fb0aac1f1e9b53bbe9121d8534f9ea1ce94f5b30b0c47947618e73938e38d72695cecbfba48684210
|
data/README.md
CHANGED
@@ -75,7 +75,7 @@ Ruby is a dynamically-typed object-oriented language, which provides great produ
|
|
75
75
|
|
76
76
|
## Table of contents
|
77
77
|
|
78
|
-
- [Glimmer - Ruby Desktop Development GUI Library](#glimmer
|
78
|
+
- [Glimmer - Ruby Desktop Development GUI Library](#glimmer---ruby-desktop-development-gui-library)
|
79
79
|
- [Examples](#examples)
|
80
80
|
- [Hello, World!](#hello-world)
|
81
81
|
- [Tic Tac Toe](#tic-tac-toe)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.1
|
data/lib/glimmer.rb
CHANGED
data/lib/glimmer/dsl/engine.rb
CHANGED
@@ -56,6 +56,10 @@ module Glimmer
|
|
56
56
|
dsl_stack.clear
|
57
57
|
disabled_dsls.clear
|
58
58
|
end
|
59
|
+
|
60
|
+
def no_dsls?
|
61
|
+
static_expressions.empty? && dynamic_expression_chains_of_responsibility.empty?
|
62
|
+
end
|
59
63
|
|
60
64
|
# Dynamic expression chains of responsibility indexed by dsl
|
61
65
|
def dynamic_expression_chains_of_responsibility
|
@@ -140,6 +144,10 @@ module Glimmer
|
|
140
144
|
|
141
145
|
# Interprets Glimmer dynamic DSL expression consisting of keyword, args, and block (e.g. shell(:no_resize) { ... })
|
142
146
|
def interpret(keyword, *args, &block)
|
147
|
+
if no_dsls?
|
148
|
+
puts "Glimmer has no DSLs configured. Add glimmer-dsl-swt gem or visit https://github.com/AndyObtiva/glimmer#multi-dsl-support for more details.\n"
|
149
|
+
return
|
150
|
+
end
|
143
151
|
keyword = keyword.to_s
|
144
152
|
dynamic_expression_dsl = (dynamic_expression_chains_of_responsibility.keys - disabled_dsls).first if dsl.nil?
|
145
153
|
dsl_stack.push(dynamic_expression_dsl || dsl)
|