glimmer 0.8.2 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +116 -95
  4. data/VERSION +1 -1
  5. data/lib/glimmer.rb +0 -20
  6. data/lib/glimmer/config.rb +0 -13
  7. data/lib/glimmer/dsl/engine.rb +25 -18
  8. data/lib/glimmer/dsl/expression.rb +0 -7
  9. data/lib/glimmer/dsl/static_expression.rb +2 -2
  10. metadata +47 -177
  11. data/RUBY_VERSION +0 -1
  12. data/bin/girb +0 -10
  13. data/bin/girb_runner.rb +0 -13
  14. data/bin/glimmer +0 -5
  15. data/icons/scaffold_app.icns +0 -0
  16. data/lib/glimmer/css/rule.rb +0 -25
  17. data/lib/glimmer/css/style_sheet.rb +0 -19
  18. data/lib/glimmer/data_binding/list_selection_binding.rb +0 -52
  19. data/lib/glimmer/data_binding/model_binding.rb +0 -248
  20. data/lib/glimmer/data_binding/observable.rb +0 -21
  21. data/lib/glimmer/data_binding/observable_array.rb +0 -107
  22. data/lib/glimmer/data_binding/observable_model.rb +0 -108
  23. data/lib/glimmer/data_binding/observable_widget.rb +0 -17
  24. data/lib/glimmer/data_binding/observer.rb +0 -124
  25. data/lib/glimmer/data_binding/shine.rb +0 -23
  26. data/lib/glimmer/data_binding/table_items_binding.rb +0 -56
  27. data/lib/glimmer/data_binding/tree_items_binding.rb +0 -71
  28. data/lib/glimmer/data_binding/widget_binding.rb +0 -33
  29. data/lib/glimmer/dsl/css/css_expression.rb +0 -21
  30. data/lib/glimmer/dsl/css/dsl.rb +0 -10
  31. data/lib/glimmer/dsl/css/dynamic_property_expression.rb +0 -12
  32. data/lib/glimmer/dsl/css/property_expression.rb +0 -22
  33. data/lib/glimmer/dsl/css/pv_expression.rb +0 -17
  34. data/lib/glimmer/dsl/css/rule_expression.rb +0 -25
  35. data/lib/glimmer/dsl/css/s_expression.rb +0 -26
  36. data/lib/glimmer/dsl/swt/async_exec_expression.rb +0 -14
  37. data/lib/glimmer/dsl/swt/bind_expression.rb +0 -37
  38. data/lib/glimmer/dsl/swt/color_expression.rb +0 -19
  39. data/lib/glimmer/dsl/swt/column_properties_expression.rb +0 -24
  40. data/lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb +0 -42
  41. data/lib/glimmer/dsl/swt/custom_widget_expression.rb +0 -36
  42. data/lib/glimmer/dsl/swt/data_binding_expression.rb +0 -34
  43. data/lib/glimmer/dsl/swt/dialog_expression.rb +0 -26
  44. data/lib/glimmer/dsl/swt/display_expression.rb +0 -19
  45. data/lib/glimmer/dsl/swt/dsl.rb +0 -28
  46. data/lib/glimmer/dsl/swt/exec_expression.rb +0 -28
  47. data/lib/glimmer/dsl/swt/layout_data_expression.rb +0 -25
  48. data/lib/glimmer/dsl/swt/layout_expression.rb +0 -27
  49. data/lib/glimmer/dsl/swt/list_selection_data_binding_expression.rb +0 -44
  50. data/lib/glimmer/dsl/swt/menu_bar_expression.rb +0 -33
  51. data/lib/glimmer/dsl/swt/menu_expression.rb +0 -32
  52. data/lib/glimmer/dsl/swt/message_box_expression.rb +0 -29
  53. data/lib/glimmer/dsl/swt/observe_expression.rb +0 -32
  54. data/lib/glimmer/dsl/swt/property_expression.rb +0 -22
  55. data/lib/glimmer/dsl/swt/rgb_expression.rb +0 -12
  56. data/lib/glimmer/dsl/swt/rgba_expression.rb +0 -12
  57. data/lib/glimmer/dsl/swt/shell_expression.rb +0 -25
  58. data/lib/glimmer/dsl/swt/swt_expression.rb +0 -25
  59. data/lib/glimmer/dsl/swt/sync_exec_expression.rb +0 -15
  60. data/lib/glimmer/dsl/swt/tab_item_expression.rb +0 -33
  61. data/lib/glimmer/dsl/swt/table_items_data_binding_expression.rb +0 -31
  62. data/lib/glimmer/dsl/swt/tree_items_data_binding_expression.rb +0 -31
  63. data/lib/glimmer/dsl/swt/tree_properties_expression.rb +0 -26
  64. data/lib/glimmer/dsl/swt/widget_expression.rb +0 -35
  65. data/lib/glimmer/dsl/swt/widget_listener_expression.rb +0 -32
  66. data/lib/glimmer/dsl/xml/dsl.rb +0 -11
  67. data/lib/glimmer/dsl/xml/html_expression.rb +0 -25
  68. data/lib/glimmer/dsl/xml/meta_expression.rb +0 -23
  69. data/lib/glimmer/dsl/xml/name_space_expression.rb +0 -37
  70. data/lib/glimmer/dsl/xml/node_parent_expression.rb +0 -33
  71. data/lib/glimmer/dsl/xml/tag_expression.rb +0 -29
  72. data/lib/glimmer/dsl/xml/text_expression.rb +0 -22
  73. data/lib/glimmer/dsl/xml/xml_expression.rb +0 -21
  74. data/lib/glimmer/launcher.rb +0 -199
  75. data/lib/glimmer/package.rb +0 -55
  76. data/lib/glimmer/rake_task.rb +0 -58
  77. data/lib/glimmer/scaffold.rb +0 -582
  78. data/lib/glimmer/swt/color_proxy.rb +0 -53
  79. data/lib/glimmer/swt/display_proxy.rb +0 -88
  80. data/lib/glimmer/swt/font_proxy.rb +0 -72
  81. data/lib/glimmer/swt/layout_data_proxy.rb +0 -84
  82. data/lib/glimmer/swt/layout_proxy.rb +0 -82
  83. data/lib/glimmer/swt/menu_proxy.rb +0 -101
  84. data/lib/glimmer/swt/message_box_proxy.rb +0 -48
  85. data/lib/glimmer/swt/packages.rb +0 -13
  86. data/lib/glimmer/swt/shell_proxy.rb +0 -152
  87. data/lib/glimmer/swt/swt_proxy.rb +0 -106
  88. data/lib/glimmer/swt/tab_item_proxy.rb +0 -65
  89. data/lib/glimmer/swt/table_proxy.rb +0 -150
  90. data/lib/glimmer/swt/tree_proxy.rb +0 -120
  91. data/lib/glimmer/swt/widget_listener_proxy.rb +0 -34
  92. data/lib/glimmer/swt/widget_proxy.rb +0 -489
  93. data/lib/glimmer/ui/custom_shell.rb +0 -45
  94. data/lib/glimmer/ui/custom_widget.rb +0 -244
  95. data/lib/glimmer/util/proc_tracker.rb +0 -16
  96. data/lib/glimmer/xml/depth_first_search_iterator.rb +0 -22
  97. data/lib/glimmer/xml/name_space_visitor.rb +0 -21
  98. data/lib/glimmer/xml/node.rb +0 -75
  99. data/lib/glimmer/xml/node_visitor.rb +0 -13
  100. data/lib/glimmer/xml/xml_visitor.rb +0 -65
  101. data/vendor/swt/linux/swt.jar +0 -0
  102. data/vendor/swt/mac/swt.jar +0 -0
  103. data/vendor/swt/windows/swt.jar +0 -0
@@ -1,6 +1,4 @@
1
1
  require 'glimmer/error'
2
- require 'glimmer/swt/widget_proxy'
3
- require 'glimmer/ui/custom_widget'
4
2
 
5
3
  module Glimmer
6
4
  module DSL
@@ -35,11 +33,6 @@ module Glimmer
35
33
  # No Op by default
36
34
  end
37
35
 
38
- # Checks if parent object is a widget
39
- def widget?(parent)
40
- parent.is_a?(Glimmer::SWT::WidgetProxy) or parent.is_a?(Glimmer::UI::CustomWidget)
41
- end
42
-
43
36
  # Checks if object is a Symbol or a String
44
37
  def textual?(object)
45
38
  object.is_a?(Symbol) or object.is_a?(String)
@@ -1,8 +1,8 @@
1
+ require 'facets/string/underscore'
2
+
1
3
  require 'glimmer/error'
2
4
  require 'glimmer/dsl/engine'
3
5
  require 'glimmer/dsl/expression'
4
- require 'glimmer/swt/widget_proxy'
5
- require 'glimmer/ui/custom_widget'
6
6
 
7
7
  module Glimmer
8
8
  module DSL
metadata CHANGED
@@ -1,177 +1,140 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-11 00:00:00.000000000 Z
11
+ date: 2020-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
17
  - !ruby/object:Gem::Version
18
18
  version: 3.1.0
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: 4.0.0
19
22
  name: facets
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: 3.1.0
27
- - !ruby/object:Gem::Dependency
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: 1.0.0
33
- name: os
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
30
+ - - "<"
39
31
  - !ruby/object:Gem::Version
40
- version: 1.0.0
32
+ version: 4.0.0
41
33
  - !ruby/object:Gem::Dependency
42
34
  requirement: !ruby/object:Gem::Requirement
43
35
  requirements:
44
36
  - - "~>"
45
37
  - !ruby/object:Gem::Version
46
- version: 1.4.1
47
- name: super_module
48
- type: :runtime
38
+ version: 3.5.0
39
+ name: rspec-mocks
40
+ type: :development
49
41
  prerelease: false
50
42
  version_requirements: !ruby/object:Gem::Requirement
51
43
  requirements:
52
44
  - - "~>"
53
45
  - !ruby/object:Gem::Version
54
- version: 1.4.1
46
+ version: 3.5.0
55
47
  - !ruby/object:Gem::Dependency
56
48
  requirement: !ruby/object:Gem::Requirement
57
49
  requirements:
58
50
  - - "~>"
59
51
  - !ruby/object:Gem::Version
60
- version: 0.3.0
61
- name: nested_inherited_jruby_include_package
62
- type: :runtime
52
+ version: 3.5.0
53
+ name: rspec
54
+ type: :development
63
55
  prerelease: false
64
56
  version_requirements: !ruby/object:Gem::Requirement
65
57
  requirements:
66
58
  - - "~>"
67
59
  - !ruby/object:Gem::Version
68
- version: 0.3.0
60
+ version: 3.5.0
69
61
  - !ruby/object:Gem::Dependency
70
62
  requirement: !ruby/object:Gem::Requirement
71
63
  requirements:
72
64
  - - "~>"
73
65
  - !ruby/object:Gem::Version
74
- version: 2.0.5
75
- name: warbler
76
- type: :runtime
66
+ version: 0.8.1
67
+ name: puts_debuggerer
68
+ type: :development
77
69
  prerelease: false
78
70
  version_requirements: !ruby/object:Gem::Requirement
79
71
  requirements:
80
72
  - - "~>"
81
73
  - !ruby/object:Gem::Version
82
- version: 2.0.5
74
+ version: 0.8.1
83
75
  - !ruby/object:Gem::Dependency
84
76
  requirement: !ruby/object:Gem::Requirement
85
77
  requirements:
86
78
  - - ">="
87
79
  - !ruby/object:Gem::Version
88
80
  version: 10.1.0
81
+ - - "<"
82
+ - !ruby/object:Gem::Version
83
+ version: 14.0.0
89
84
  name: rake
90
- type: :runtime
85
+ type: :development
91
86
  prerelease: false
92
87
  version_requirements: !ruby/object:Gem::Requirement
93
88
  requirements:
94
89
  - - ">="
95
90
  - !ruby/object:Gem::Version
96
91
  version: 10.1.0
92
+ - - "<"
93
+ - !ruby/object:Gem::Version
94
+ version: 14.0.0
97
95
  - !ruby/object:Gem::Dependency
98
96
  requirement: !ruby/object:Gem::Requirement
99
97
  requirements:
100
- - - '='
98
+ - - ">="
101
99
  - !ruby/object:Gem::Version
102
100
  version: 2.3.9
101
+ - - "<"
102
+ - !ruby/object:Gem::Version
103
+ version: 3.0.0
103
104
  name: jeweler
104
- type: :runtime
105
+ type: :development
105
106
  prerelease: false
106
107
  version_requirements: !ruby/object:Gem::Requirement
107
108
  requirements:
108
- - - '='
109
+ - - ">="
109
110
  - !ruby/object:Gem::Version
110
111
  version: 2.3.9
111
- - !ruby/object:Gem::Dependency
112
- requirement: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - '='
115
- - !ruby/object:Gem::Version
116
- version: 6.2.1
117
- name: rdoc
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - '='
112
+ - - "<"
123
113
  - !ruby/object:Gem::Version
124
- version: 6.2.1
114
+ version: 3.0.0
125
115
  - !ruby/object:Gem::Dependency
126
116
  requirement: !ruby/object:Gem::Requirement
127
117
  requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: 3.5.0
131
- name: rspec-mocks
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
118
+ - - ">="
137
119
  - !ruby/object:Gem::Version
138
- version: 3.5.0
139
- - !ruby/object:Gem::Dependency
140
- requirement: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
120
+ version: 6.2.1
121
+ - - "<"
143
122
  - !ruby/object:Gem::Version
144
- version: 3.5.0
145
- name: rspec
123
+ version: 7.0.0
124
+ name: rdoc
146
125
  type: :development
147
126
  prerelease: false
148
127
  version_requirements: !ruby/object:Gem::Requirement
149
128
  requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: 3.5.0
153
- - !ruby/object:Gem::Dependency
154
- requirement: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
129
+ - - ">="
157
130
  - !ruby/object:Gem::Version
158
- version: 0.8.1
159
- name: puts_debuggerer
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
131
+ version: 6.2.1
132
+ - - "<"
165
133
  - !ruby/object:Gem::Version
166
- version: 0.8.1
167
- description: "Ruby Desktop Development GUI Library (JRuby on SWT). \n\nChanges: \n\
168
- - `message_box` DSL keyword\n- Table single/multi selection databinding\n- Table\
169
- \ cell editing databinding\n- Enhance table listener events with table_item and\
170
- \ column_index methods\n- Fix `Glimmer::SWT::ShellProxy#pack_same_size` for Linux\n"
134
+ version: 7.0.0
135
+ description: Ruby Desktop Development GUI Library (JRuby on SWT)
171
136
  email: andy.am@gmail.com
172
- executables:
173
- - glimmer
174
- - girb
137
+ executables: []
175
138
  extensions: []
176
139
  extra_rdoc_files:
177
140
  - LICENSE.txt
@@ -179,110 +142,17 @@ extra_rdoc_files:
179
142
  files:
180
143
  - LICENSE.txt
181
144
  - README.md
182
- - RUBY_VERSION
183
145
  - VERSION
184
- - bin/girb
185
- - bin/girb_runner.rb
186
- - bin/glimmer
187
- - icons/scaffold_app.icns
188
146
  - lib/glimmer.rb
189
147
  - lib/glimmer/config.rb
190
- - lib/glimmer/css/rule.rb
191
- - lib/glimmer/css/style_sheet.rb
192
- - lib/glimmer/data_binding/list_selection_binding.rb
193
- - lib/glimmer/data_binding/model_binding.rb
194
- - lib/glimmer/data_binding/observable.rb
195
- - lib/glimmer/data_binding/observable_array.rb
196
- - lib/glimmer/data_binding/observable_model.rb
197
- - lib/glimmer/data_binding/observable_widget.rb
198
- - lib/glimmer/data_binding/observer.rb
199
- - lib/glimmer/data_binding/shine.rb
200
- - lib/glimmer/data_binding/table_items_binding.rb
201
- - lib/glimmer/data_binding/tree_items_binding.rb
202
- - lib/glimmer/data_binding/widget_binding.rb
203
- - lib/glimmer/dsl/css/css_expression.rb
204
- - lib/glimmer/dsl/css/dsl.rb
205
- - lib/glimmer/dsl/css/dynamic_property_expression.rb
206
- - lib/glimmer/dsl/css/property_expression.rb
207
- - lib/glimmer/dsl/css/pv_expression.rb
208
- - lib/glimmer/dsl/css/rule_expression.rb
209
- - lib/glimmer/dsl/css/s_expression.rb
210
148
  - lib/glimmer/dsl/engine.rb
211
149
  - lib/glimmer/dsl/expression.rb
212
150
  - lib/glimmer/dsl/expression_handler.rb
213
151
  - lib/glimmer/dsl/parent_expression.rb
214
152
  - lib/glimmer/dsl/static_expression.rb
215
- - lib/glimmer/dsl/swt/async_exec_expression.rb
216
- - lib/glimmer/dsl/swt/bind_expression.rb
217
- - lib/glimmer/dsl/swt/color_expression.rb
218
- - lib/glimmer/dsl/swt/column_properties_expression.rb
219
- - lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb
220
- - lib/glimmer/dsl/swt/custom_widget_expression.rb
221
- - lib/glimmer/dsl/swt/data_binding_expression.rb
222
- - lib/glimmer/dsl/swt/dialog_expression.rb
223
- - lib/glimmer/dsl/swt/display_expression.rb
224
- - lib/glimmer/dsl/swt/dsl.rb
225
- - lib/glimmer/dsl/swt/exec_expression.rb
226
- - lib/glimmer/dsl/swt/layout_data_expression.rb
227
- - lib/glimmer/dsl/swt/layout_expression.rb
228
- - lib/glimmer/dsl/swt/list_selection_data_binding_expression.rb
229
- - lib/glimmer/dsl/swt/menu_bar_expression.rb
230
- - lib/glimmer/dsl/swt/menu_expression.rb
231
- - lib/glimmer/dsl/swt/message_box_expression.rb
232
- - lib/glimmer/dsl/swt/observe_expression.rb
233
- - lib/glimmer/dsl/swt/property_expression.rb
234
- - lib/glimmer/dsl/swt/rgb_expression.rb
235
- - lib/glimmer/dsl/swt/rgba_expression.rb
236
- - lib/glimmer/dsl/swt/shell_expression.rb
237
- - lib/glimmer/dsl/swt/swt_expression.rb
238
- - lib/glimmer/dsl/swt/sync_exec_expression.rb
239
- - lib/glimmer/dsl/swt/tab_item_expression.rb
240
- - lib/glimmer/dsl/swt/table_items_data_binding_expression.rb
241
- - lib/glimmer/dsl/swt/tree_items_data_binding_expression.rb
242
- - lib/glimmer/dsl/swt/tree_properties_expression.rb
243
- - lib/glimmer/dsl/swt/widget_expression.rb
244
- - lib/glimmer/dsl/swt/widget_listener_expression.rb
245
153
  - lib/glimmer/dsl/top_level_expression.rb
246
- - lib/glimmer/dsl/xml/dsl.rb
247
- - lib/glimmer/dsl/xml/html_expression.rb
248
- - lib/glimmer/dsl/xml/meta_expression.rb
249
- - lib/glimmer/dsl/xml/name_space_expression.rb
250
- - lib/glimmer/dsl/xml/node_parent_expression.rb
251
- - lib/glimmer/dsl/xml/tag_expression.rb
252
- - lib/glimmer/dsl/xml/text_expression.rb
253
- - lib/glimmer/dsl/xml/xml_expression.rb
254
154
  - lib/glimmer/error.rb
255
155
  - lib/glimmer/invalid_keyword_error.rb
256
- - lib/glimmer/launcher.rb
257
- - lib/glimmer/package.rb
258
- - lib/glimmer/rake_task.rb
259
- - lib/glimmer/scaffold.rb
260
- - lib/glimmer/swt/color_proxy.rb
261
- - lib/glimmer/swt/display_proxy.rb
262
- - lib/glimmer/swt/font_proxy.rb
263
- - lib/glimmer/swt/layout_data_proxy.rb
264
- - lib/glimmer/swt/layout_proxy.rb
265
- - lib/glimmer/swt/menu_proxy.rb
266
- - lib/glimmer/swt/message_box_proxy.rb
267
- - lib/glimmer/swt/packages.rb
268
- - lib/glimmer/swt/shell_proxy.rb
269
- - lib/glimmer/swt/swt_proxy.rb
270
- - lib/glimmer/swt/tab_item_proxy.rb
271
- - lib/glimmer/swt/table_proxy.rb
272
- - lib/glimmer/swt/tree_proxy.rb
273
- - lib/glimmer/swt/widget_listener_proxy.rb
274
- - lib/glimmer/swt/widget_proxy.rb
275
- - lib/glimmer/ui/custom_shell.rb
276
- - lib/glimmer/ui/custom_widget.rb
277
- - lib/glimmer/util/proc_tracker.rb
278
- - lib/glimmer/xml/depth_first_search_iterator.rb
279
- - lib/glimmer/xml/name_space_visitor.rb
280
- - lib/glimmer/xml/node.rb
281
- - lib/glimmer/xml/node_visitor.rb
282
- - lib/glimmer/xml/xml_visitor.rb
283
- - vendor/swt/linux/swt.jar
284
- - vendor/swt/mac/swt.jar
285
- - vendor/swt/windows/swt.jar
286
156
  homepage: http://github.com/AndyObtiva/glimmer
287
157
  licenses:
288
158
  - MIT
@@ -1 +0,0 @@
1
- jruby-9.2.11.1
data/bin/girb DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- trap "SIGINT" do
4
- # No Op for irb
5
- end
6
-
7
- require_relative '../lib/glimmer/launcher'
8
-
9
- girb_runner = File.expand_path('../girb_runner.rb', __FILE__)
10
- Glimmer::Launcher.new(["irb -r #{girb_runner}"] + ARGV).launch
@@ -1,13 +0,0 @@
1
- require 'puts_debuggerer'
2
-
3
- include Glimmer
4
-
5
- # Hijack Shell#start_event_loop default behavior to ensure disposing a display upon closing a shell inside girb
6
-
7
- Glimmer::SWT::ShellProxy.class_eval do
8
- alias start_event_loop_original start_event_loop
9
- def start_event_loop
10
- start_event_loop_original
11
- Glimmer::SWT::DisplayProxy.instance.dispose
12
- end
13
- end
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative '../lib/glimmer/launcher'
4
-
5
- Glimmer::Launcher.new(ARGV).launch
Binary file
@@ -1,25 +0,0 @@
1
- module Glimmer
2
- module CSS
3
- class Rule
4
- attr_reader :selector, :properties
5
-
6
- def initialize(selector)
7
- @selector = selector
8
- @properties = {}
9
- end
10
-
11
- def add_property(keyword, *args)
12
- keyword = keyword.to_s.downcase.gsub('_', '-')
13
- @properties[keyword] = args.first
14
- end
15
-
16
- def to_css
17
- css = "#{@selector}{"
18
- css << @properties.map { |name, value| "#{name}:#{value}" }.join(';')
19
- css << "}"
20
- end
21
-
22
- alias to_s to_css
23
- end
24
- end
25
- end
@@ -1,19 +0,0 @@
1
- require 'glimmer/css/rule'
2
-
3
- module Glimmer
4
- module CSS
5
- class StyleSheet
6
- attr_reader :rules
7
-
8
- def initialize
9
- @rules = []
10
- end
11
-
12
- def to_css
13
- rules.map(&:to_css).join
14
- end
15
-
16
- alias to_s to_css
17
- end
18
- end
19
- end