glimmer 2.7.0 → 2.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +14 -7
- data/VERSION +1 -1
- data/glimmer.gemspec +5 -5
- data/lib/glimmer/data_binding/observable_array.rb +1 -2
- data/lib/glimmer/dsl/engine.rb +34 -2
- data/lib/glimmer/dsl/static_expression.rb +58 -2
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47db370b7e55a13d57155cb65baefc6176157af4abfb520405b49287c0dd1d53
|
4
|
+
data.tar.gz: '082b27860acaa6ccac808aec5190f08f87d28b56c2eadeb8939bdff52a4e0563'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a24bc2dda1ced284c21e5f6e251f92425522e4f173f1adc55db8584cb53d8ab0302967a5441585e0e09bb4dbd34132c944373f06e79e92f78f2b3564ebcd76bb
|
7
|
+
data.tar.gz: c9366d6aaca9b26e7632faa12f61c50e50e1ad5d5d5a3a43f37c75a6eb753b16add2045ce018d2fc96f1c935facd5a9919489352f604409bd22323a50523eadb
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,18 @@
|
|
3
3
|
Related Change Logs:
|
4
4
|
- [glimmer-dsl-swt/CHANGELOG.md](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/CHANGELOG.md)
|
5
5
|
|
6
|
+
### 2.7.3
|
7
|
+
|
8
|
+
- Support case-insensitive static expressions
|
9
|
+
|
10
|
+
### 2.7.2
|
11
|
+
|
12
|
+
- Support capitalized static expressions
|
13
|
+
|
14
|
+
### 2.7.1
|
15
|
+
|
16
|
+
- Support upcased static expressions (in addition to default downcased ones)
|
17
|
+
|
6
18
|
### 2.7.0
|
7
19
|
|
8
20
|
- Support Hash keyed properties via `ModelBinding` (e.g. property as `some_hash_attribute[:some_key]`, `some_hash_attribute['some_key']`, `some_hash_attribute["some_key"]`)
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer 2.7.
|
1
|
+
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer 2.7.3
|
2
2
|
## DSL Framework for Ruby GUI and More
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/glimmer.svg)](http://badge.fury.io/rb/glimmer)
|
4
4
|
[![rspec](https://github.com/AndyObtiva/glimmer/workflows/rspec/badge.svg)](https://github.com/AndyObtiva/glimmer/actions?query=workflow%3Arspec)
|
@@ -8,6 +8,8 @@
|
|
8
8
|
|
9
9
|
**(The Original Glimmer Library Handling the World’s Ruby GUI Needs Since 2007. Beware of Imitators!)**
|
10
10
|
|
11
|
+
[**(Glimmer DSL for LibUI Won a Fukuoka Ruby 2022 Special Award!)**](http://www.digitalfukuoka.jp/topics/187?locale=ja)
|
12
|
+
|
11
13
|
[**Glimmer**](https://rubygems.org/gems/glimmer) started out as a [GUI Library](https://github.com/AndyObtiva/glimmer-dsl-swt) and grew into a full-fledged [DSL Framework](#dsl-engine) with support for multiple GUI DSLs. Glimmer's namesake is referring to the Glimmer of Ruby in Graphical User Interfaces (contrary to [popular myth](http://blog.headius.com/2007/11/tab-sweep.html) perpetrated by [Charles Nutter](http://blog.headius.com/2007/11/tab-sweep.html), Glimmer has nothing to do with the ill-fated Whitney Houston movie, which does not in fact share the same name)
|
12
14
|
|
13
15
|
[<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
|
@@ -34,7 +36,7 @@ DSL | Platforms | Native? | Vector Graphics? | Pros | Cons | Prereqs
|
|
34
36
|
[Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)](https://github.com/AndyObtiva/glimmer-dsl-swt) | Mac / Windows / Linux | Yes | Yes (Canvas Shape DSL) | Very Mature / Scaffolding / Native Executable Packaging / Custom Widgets | Slow JRuby Startup Time / Heavy Memory Footprint | Java / JRuby
|
35
37
|
[Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)](https://github.com/AndyObtiva/glimmer-dsl-opal) | All Web Browsers | No | Yes (Canvas Shape DSL) | Simpler than All JavaScript Technologies / Auto-Webify Desktop Apps | Setup Process / Incomplete Alpha | Rails
|
36
38
|
[Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-libui) | Mac / Windows / Linux | Yes | Yes (Area API) | Very Simple Setup / Fast Startup Time / Light Memory Footprint | LibUI is an Incomplete Mid-Alpha Only | None Other Than MRI Ruby
|
37
|
-
[Glimmer DSL for Tk (
|
39
|
+
[Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-tk) | Mac / Windows / Linux | Some Native-Themed Widgets (Not Truly Native) | Yes (Canvas) | Fast Startup Time / Light Memory Footprint | Complicated setup / Widgets Do Not Look Truly Native, Espcially on Linux | ActiveTcl / MRI Ruby
|
38
40
|
[Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-gtk) | Mac / Windows / Linux | Only on Linux | Yes (Cairo) | Complete Access to GNOME Features on Linux | Not Native on Mac and Windows | None Other Than MRI Ruby on Linux / Brew Packages on Mac / MSYS & MING Toolchains on Windows / MRI Ruby
|
39
41
|
[Glimmer DSL for FX (FOX Toolkit Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-fx) | Mac (requires XQuartz) / Windows / Linux | No | Yes (Canvas) | No Prerequisites on Windows | Widgets Do Not Look Native / Mac Usage Obtrusively Starts XQuartz | None Other Than MRI Ruby on Windows / XQuarts on Mac / MRI Ruby
|
40
42
|
[Glimmer DSL for JFX (JRuby JavaFX Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-jfx) | Mac / Windows / Linux | No | Yes (javafx.scene.shape and javafx.scene.canvas) | Rich in Custom Widgets | Slow JRuby Startup Time / Heavy Memory Footprint / Widgets Do Not Look Native | Java / JRuby / JavaFX SDK
|
@@ -127,6 +129,11 @@ Every `Expression` sublcass must specify two methods at least:
|
|
127
129
|
- `interpret(parent, keyword, *args, &block)`: to go ahead and interpret a DSL expression that qualified for interpretation
|
128
130
|
|
129
131
|
`StaticExpression` sublcasses may skip the `can_interpret?` method since they include a default implementation for it that matches the name of the keyword from the class name by convention. For example, a `color` keyword would have a `ColorExpression` class, so `color` is inferred automatically from class name and used in deciding whether the class can handle a `color` keyword or not.
|
132
|
+
`StaticExpression` may declare the following class method options (if any other than `downcased` (default) is set, then `downcased` must be set explicitly if needed):
|
133
|
+
- `downcased true` (default): indicates that the StaticExpression expects downcased keywords (e.g. `COLOR {}`)
|
134
|
+
- `upcased true`: indicates that the StaticExpression expects upcased keywords (e.g. `COLOR {}`). Note that upcased static expressions always expect either argument parentheses or block curly braces to be invoked as a static expression method instead of a constant.
|
135
|
+
- `capitalized true`: indicates that the StaticExpression expects capitalized keywords (e.g. `Color {}`). Note that capitalized static expressions always expect either argument parentheses or block curly braces to be invoked as a static expression method instead of a constant.
|
136
|
+
- `case_insensitive true`: indicates that the StaticExpression supports downcased, upcased, and capitalized keywords (e.g. `color {}`, `COLOR {}`, and `Color {}`). Note that upcased/capitalized static expressions always expect either argument parentheses or block curly braces to be invoked as a static expression method instead of a constant.
|
130
137
|
|
131
138
|
`ParentExpression` subclasses can optionally override this extra method, which is included by default and simply invokes the parent's passed block to process its children:
|
132
139
|
- `add_content(parent, keyword, *args, &block)`
|
@@ -241,7 +248,7 @@ end
|
|
241
248
|
### Setup
|
242
249
|
|
243
250
|
Follow these steps to author a [Glimmer](https://rubygems.org/gems/glimmer) DSL:
|
244
|
-
- Add `gem 'glimmer', '~> 2.7.
|
251
|
+
- Add `gem 'glimmer', '~> 2.7.3'` to `Gemfile` and run `bundle` or run `gem install glimmer -v2.7.3` and add `require 'glimmer'`
|
245
252
|
- Create `glimmer/dsl/[dsl_name]/dsl.rb`, which requires and adds all dynamic expressions for the [dsl_name] Glimmer DSL module as per the code shown in the previous section (or [Official DSLs](#official-dsls) as examples)
|
246
253
|
- Create `glimmer/dsl/[dsl_name]/[expresion_name]_expresion.rb` for every [expresion_name] expression needed, whether dynamic or static
|
247
254
|
|
@@ -542,7 +549,7 @@ Glimmer GUI code (from [samples/hello/hello_table.rb](https://github.com/AndyObt
|
|
542
549
|
|
543
550
|
##### Production Desktop Apps Built with Glimmer DSL for SWT
|
544
551
|
|
545
|
-
[<img alt="Are We There Yet Logo" src="https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-logo.svg" width="40" />Are We There Yet?](https://github.com/AndyObtiva/are-we-there-yet) - Small Project Tracking App
|
552
|
+
[<img alt="Are We There Yet Logo" src="https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-logo.svg" width="40" />Are We There Yet?](https://github.com/AndyObtiva/are-we-there-yet) - Small Project Tracking App (leveraging ActiveRecord and SQLite)
|
546
553
|
|
547
554
|
[![Are We There Yet? App Screenshot](https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-screenshot-windows.png)](https://github.com/AndyObtiva/are-we-there-yet)
|
548
555
|
|
@@ -550,7 +557,7 @@ Glimmer GUI code (from [samples/hello/hello_table.rb](https://github.com/AndyObt
|
|
550
557
|
|
551
558
|
[![Math Bowling App Screenshot](https://raw.githubusercontent.com/AndyObtiva/MathBowling/master/Math-Bowling-Screenshot.png)](https://github.com/AndyObtiva/MathBowling)
|
552
559
|
|
553
|
-
[<img alt="Garderie Rainbow Daily Agenda Logo" src="https://raw.githubusercontent.com/AndyObtiva/garderie_rainbow_daily_agenda/master/images/garderie_rainbow_daily_agenda_logo.png" width="40" />Garderie Rainbow Daily Agenda](https://github.com/AndyObtiva/garderie_rainbow_daily_agenda) - A child nursery daily agenda reporting desktop app
|
560
|
+
[<img alt="Garderie Rainbow Daily Agenda Logo" src="https://raw.githubusercontent.com/AndyObtiva/garderie_rainbow_daily_agenda/master/images/garderie_rainbow_daily_agenda_logo.png" width="40" />Garderie Rainbow Daily Agenda](https://github.com/AndyObtiva/garderie_rainbow_daily_agenda) - A child nursery daily agenda reporting desktop app (communicates to a Rails Server and stores data using ActiveRecord/PostgreSQL [in its rails_server branch])
|
554
561
|
|
555
562
|
[![Garderie Rainbow Daily Agenda App Screenshot](https://raw.githubusercontent.com/AndyObtiva/garderie_rainbow_daily_agenda/master/images/garderie_rainbow_daily_agenda_screenshot.png)](https://github.com/AndyObtiva/garderie_rainbow_daily_agenda)
|
556
563
|
|
@@ -558,7 +565,7 @@ Glimmer GUI code (from [samples/hello/hello_table.rb](https://github.com/AndyObt
|
|
558
565
|
|
559
566
|
[Glimmer DSL for Opal](https://github.com/AndyObtiva/glimmer-dsl-opal) is an experimental proof-of-concept web GUI adapter for [Glimmer](https://github.com/AndyObtiva/glimmer) desktop apps (i.e. apps built with [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt)). It webifies them via [Rails](https://rubyonrails.org/), allowing Ruby desktop apps to run on the web via [Opal Ruby](https://opalrb.com/) without changing a line of code. Apps may then be custom-styled for the web with standard CSS.
|
560
567
|
|
561
|
-
Glimmer DSL for Opal webifier successfully reuses the entire [Glimmer](https://github.com/AndyObtiva/glimmer) core DSL engine in [Opal Ruby](https://opalrb.com/) inside a web browser, and as such inherits the full range of
|
568
|
+
Glimmer DSL for Opal webifier successfully reuses the entire [Glimmer](https://github.com/AndyObtiva/glimmer) core DSL engine in [Opal Ruby](https://opalrb.com/) inside a web browser, and as such inherits the full range of Glimmer desktop [data-binding](https://github.com/AndyObtiva/glimmer#data-binding) capabilities for the web.
|
562
569
|
|
563
570
|
To get started, visit the [Glimmer DSL for Opal project page](https://github.com/AndyObtiva/glimmer-dsl-opal) for instructions on installing the [glimmer-dsl-opal gem](https://rubygems.org/gems/glimmer-dsl-opal).
|
564
571
|
|
@@ -1400,7 +1407,7 @@ If your company would like to invest fulltime in further development of the Glim
|
|
1400
1407
|
|
1401
1408
|
[MIT](LICENSE.txt)
|
1402
1409
|
|
1403
|
-
Copyright (c) 2007-
|
1410
|
+
Copyright (c) 2007-2022 - Andy Maleh.
|
1404
1411
|
|
1405
1412
|
--
|
1406
1413
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.3
|
data/glimmer.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: glimmer 2.7.
|
5
|
+
# stub: glimmer 2.7.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glimmer".freeze
|
9
|
-
s.version = "2.7.
|
9
|
+
s.version = "2.7.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["AndyMaleh".freeze]
|
14
|
-
s.date = "2022-
|
15
|
-
s.description = "Glimmer is a Ruby DSL Framework for Ruby GUI and More, consisting of a DSL Engine and an Observable / Observer / Data-Binding Library (including Observable Model, Observable Array, and Observable Hash). Used in Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps), Glimmer DSL for
|
14
|
+
s.date = "2022-03-26"
|
15
|
+
s.description = "Glimmer is a Ruby DSL Framework for Ruby GUI and More, consisting of a DSL Engine and an Observable / Observer / Data-Binding Library (including Observable Model, Observable Array, and Observable Hash). Used in Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for FX (FOX Toolkit Ruby Desktop Development GUI Library), Glimmer DSL for Swing (JRuby Swing Desktop Development GUI Library), Glimmer DSL for JFX (JRuby JavaFX Desktop Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS.".freeze
|
16
16
|
s.email = "andy.am@gmail.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
18
18
|
"CHANGELOG.md",
|
@@ -54,7 +54,7 @@ Gem::Specification.new do |s|
|
|
54
54
|
s.homepage = "http://github.com/AndyObtiva/glimmer".freeze
|
55
55
|
s.licenses = ["MIT".freeze]
|
56
56
|
s.rubygems_version = "3.3.1".freeze
|
57
|
-
s.summary = "Glimmer - DSL
|
57
|
+
s.summary = "Glimmer - DSL Framework for Ruby GUI and More".freeze
|
58
58
|
|
59
59
|
if s.respond_to? :specification_version then
|
60
60
|
s.specification_version = 4
|
@@ -47,8 +47,7 @@ module Glimmer
|
|
47
47
|
|
48
48
|
def add_observer(observer, *args)
|
49
49
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
50
|
-
element_properties = args
|
51
|
-
element_properties = element_properties.flatten.compact.uniq
|
50
|
+
element_properties = args.flatten.compact.uniq
|
52
51
|
return observer if has_observer?(observer) && has_observer_element_properties?(observer, element_properties)
|
53
52
|
property_observer_list[observer] = options
|
54
53
|
observer_element_properties[observer] = Concurrent::Set.new(Concurrent::Array.new(element_properties_for(observer).to_a) + Concurrent::Array.new(element_properties)) # converting to Array as a workaround to jruby-9.3.2.0 issue TODO remove this workaround when no longer needed
|
data/lib/glimmer/dsl/engine.rb
CHANGED
@@ -150,14 +150,46 @@ module Glimmer
|
|
150
150
|
end
|
151
151
|
end
|
152
152
|
|
153
|
-
def
|
153
|
+
def add_downcased_static_expression(static_expression)
|
154
154
|
Glimmer::Config.logger.info {"Adding static expression: #{static_expression.class.name}"}
|
155
155
|
keyword = static_expression.class.keyword
|
156
|
-
static_expression_dsl = static_expression.class.dsl
|
157
156
|
static_expressions[keyword] ||= Concurrent::Hash.new
|
157
|
+
static_expression_dsl = static_expression.class.dsl
|
158
158
|
static_expressions[keyword][static_expression_dsl] = static_expression
|
159
159
|
Glimmer.send(:define_method, keyword, &STATIC_EXPRESSION_METHOD_FACTORY.call(keyword))
|
160
160
|
end
|
161
|
+
alias add_static_expression add_downcased_static_expression
|
162
|
+
|
163
|
+
def remove_downcased_static_expression(static_expression)
|
164
|
+
if !static_expression.class.downcased?
|
165
|
+
keyword = static_expression.class.keyword
|
166
|
+
static_expressions[keyword].delete(static_expression_dsl) if static_expressions[keyword]
|
167
|
+
static_expressions.delete(keyword) if static_expressions[keyword].empty?
|
168
|
+
Glimmer.send(:undef_method, keyword) if (Glimmer.method(keyword) rescue nil)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
def add_upcased_static_expression(static_expression)
|
173
|
+
if static_expression.class.upcased?
|
174
|
+
Glimmer::Config.logger.info {"Adding upcased static expression: #{static_expression.class.name}"}
|
175
|
+
keyword = static_expression.class.keyword
|
176
|
+
static_expression_dsl = static_expression.class.dsl
|
177
|
+
static_expressions[keyword.upcase] ||= Concurrent::Hash.new
|
178
|
+
static_expressions[keyword.upcase][static_expression_dsl] = static_expression
|
179
|
+
Glimmer.send(:define_method, keyword.upcase, &STATIC_EXPRESSION_METHOD_FACTORY.call(keyword.upcase))
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
def add_capitalized_static_expression(static_expression)
|
184
|
+
if static_expression.class.capitalized?
|
185
|
+
Glimmer::Config.logger.info {"Adding capitalized static expression: #{static_expression.class.name}"}
|
186
|
+
keyword = static_expression.class.keyword
|
187
|
+
static_expression_dsl = static_expression.class.dsl
|
188
|
+
static_expressions[keyword.capitalize] ||= Concurrent::Hash.new
|
189
|
+
static_expressions[keyword.capitalize][static_expression_dsl] = static_expression
|
190
|
+
Glimmer.send(:define_method, keyword.capitalize, &STATIC_EXPRESSION_METHOD_FACTORY.call(keyword.capitalize))
|
191
|
+
end
|
192
|
+
end
|
161
193
|
|
162
194
|
def expression_class(dsl_namespace, expression_name)
|
163
195
|
dsl_namespace.const_get(expression_class_name(expression_name).to_sym)
|
@@ -44,16 +44,72 @@ module Glimmer
|
|
44
44
|
Glimmer::DSL::Engine.add_static_expression(base.new)
|
45
45
|
super
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
def keyword
|
49
49
|
@keyword ||= name.split(/::/).last.sub(/Expression$/, '').underscore
|
50
50
|
end
|
51
|
+
|
52
|
+
def downcased(value)
|
53
|
+
@downcased = value
|
54
|
+
Glimmer::DSL::Engine.add_downcased_static_expression(new) if @downcased
|
55
|
+
end
|
56
|
+
alias downcase downcased
|
57
|
+
|
58
|
+
def downcased?
|
59
|
+
# default is true when no attributes are set
|
60
|
+
@downcased.nil? && @upcased.nil? && @capitalized.nil? ? true : @downcased
|
61
|
+
end
|
62
|
+
alias downcase? downcased?
|
63
|
+
|
64
|
+
def upcased(value)
|
65
|
+
@upcased = value
|
66
|
+
Glimmer::DSL::Engine.add_upcased_static_expression(new) if @upcased
|
67
|
+
end
|
68
|
+
alias upcase upcased
|
69
|
+
|
70
|
+
def upcased?
|
71
|
+
@upcased
|
72
|
+
end
|
73
|
+
alias upcase? upcased?
|
74
|
+
|
75
|
+
def capitalized(value)
|
76
|
+
@capitalized = value
|
77
|
+
Glimmer::DSL::Engine.add_capitalized_static_expression(new) if @capitalized
|
78
|
+
end
|
79
|
+
alias capitalize capitalized
|
80
|
+
alias capital capitalized
|
81
|
+
|
82
|
+
def capitalized?
|
83
|
+
@capitalized
|
84
|
+
end
|
85
|
+
alias capitalize? capitalized?
|
86
|
+
alias capital? capitalized?
|
87
|
+
|
88
|
+
def case_insensitive(value)
|
89
|
+
if value
|
90
|
+
self.downcased(true)
|
91
|
+
self.upcased(true)
|
92
|
+
self.capitalized(true)
|
93
|
+
else
|
94
|
+
self.downcased(true)
|
95
|
+
self.upcased(false)
|
96
|
+
self.capitalized(false)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
def case_insensitive?
|
101
|
+
downcased? && upcased? && capitalized?
|
102
|
+
end
|
51
103
|
end
|
52
104
|
|
53
105
|
# Subclasses may optionally implement, but by default it only ensures that
|
54
106
|
# the keyword matches lower case static expression class name minus `Expression`
|
55
107
|
def can_interpret?(parent, keyword, *args, &block)
|
56
|
-
|
108
|
+
result = false
|
109
|
+
result ||= keyword.downcase == keyword if self.class.downcased?
|
110
|
+
result ||= keyword.upcase == keyword if self.class.upcased?
|
111
|
+
result ||= keyword.capitalize == keyword if self.class.capitalized?
|
112
|
+
result
|
57
113
|
end
|
58
114
|
end
|
59
115
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AndyMaleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: array_include_methods
|
@@ -206,10 +206,12 @@ description: Glimmer is a Ruby DSL Framework for Ruby GUI and More, consisting o
|
|
206
206
|
a DSL Engine and an Observable / Observer / Data-Binding Library (including Observable
|
207
207
|
Model, Observable Array, and Observable Hash). Used in Glimmer DSL for SWT (JRuby
|
208
208
|
Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI and
|
209
|
-
Auto-Webifier of Desktop Apps), Glimmer DSL for
|
210
|
-
Library), Glimmer DSL for
|
211
|
-
|
212
|
-
|
209
|
+
Auto-Webifier of Desktop Apps), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop
|
210
|
+
Development GUI Library), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library),
|
211
|
+
Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for
|
212
|
+
FX (FOX Toolkit Ruby Desktop Development GUI Library), Glimmer DSL for Swing (JRuby
|
213
|
+
Swing Desktop Development GUI Library), Glimmer DSL for JFX (JRuby JavaFX Desktop
|
214
|
+
Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS.
|
213
215
|
email: andy.am@gmail.com
|
214
216
|
executables: []
|
215
217
|
extensions: []
|
@@ -270,5 +272,5 @@ requirements: []
|
|
270
272
|
rubygems_version: 3.3.1
|
271
273
|
signing_key:
|
272
274
|
specification_version: 4
|
273
|
-
summary: Glimmer - DSL
|
275
|
+
summary: Glimmer - DSL Framework for Ruby GUI and More
|
274
276
|
test_files: []
|