UEML 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/ueml.rb +30 -0
- metadata +43 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 0af3f9b5d47de4fa4d1ac809b8faa74ed30e4d5ce86e451ac2b94148bbefdaab
|
|
4
|
+
data.tar.gz: e18c8eb81a3eefe102e962b233c9d3499543b0196edb399f01257dfebb5a2681
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 075d2498a484e1ae1c8f38c1dd7ceb187adf4102f4b395b4e4f806f8d07a3e35f4242fa5f28bb5a03d4d92f8a8af118c973d2350650e5ab828c9cf49008bb19f
|
|
7
|
+
data.tar.gz: b53fbcb3163497881d0f6dd8e35957aaa97ba669cef879609c15088ef8b63c20dcc3e7ae8e57de939a1f25e056f03716343b7bcd3b51e4ff9baff270fee9919b
|
data/lib/ueml.rb
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
class UEMLParser
|
|
2
|
+
def initialize(file)
|
|
3
|
+
@file = file
|
|
4
|
+
@sections = {}
|
|
5
|
+
@current_section = nil
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def parse
|
|
9
|
+
File.readlines(@file).each_with_index do |line, index|
|
|
10
|
+
line.strip!
|
|
11
|
+
|
|
12
|
+
next if line.start_with?("//")
|
|
13
|
+
|
|
14
|
+
if line.start_with?(">")
|
|
15
|
+
@current_section = line[1..].strip
|
|
16
|
+
@sections[@current_section] = {}
|
|
17
|
+
else
|
|
18
|
+
if line.end_with?(";")
|
|
19
|
+
key, value = line.chomp(";").split("=", 2).map(&:strip)
|
|
20
|
+
@sections[@current_section][key] = value
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def sections
|
|
27
|
+
@sections
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
metadata
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: UEML
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: '0.3'
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- juanvel400
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2025-01-18 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: The official UEML Parser
|
|
14
|
+
email: juanvel400@proton.me
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- lib/ueml.rb
|
|
20
|
+
homepage: https://github.com/juanvel4000/ueml
|
|
21
|
+
licenses:
|
|
22
|
+
- MIT
|
|
23
|
+
metadata: {}
|
|
24
|
+
post_install_message:
|
|
25
|
+
rdoc_options: []
|
|
26
|
+
require_paths:
|
|
27
|
+
- lib
|
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - ">="
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
requirements: []
|
|
39
|
+
rubygems_version: 3.5.16
|
|
40
|
+
signing_key:
|
|
41
|
+
specification_version: 4
|
|
42
|
+
summary: Official UEML Parser Gem
|
|
43
|
+
test_files: []
|