muncraft 1.5.2

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/muncraft.rb +13 -0
  3. metadata +43 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d543eb653015b277da99ab31bc1151857b5d21ebc53ab743ca5dfa86f20b8b45
4
+ data.tar.gz: 7d537b0877615c4bb4cb74650880a0da980ffd0064e31e18fb2e04a2872d9fe5
5
+ SHA512:
6
+ metadata.gz: 4299d98f12b540fd73b589ab9a26ab65f4f4822da217d5e5bc83cffdbe7c094f1c77ed73fcf9f9c18a4d0ada3f6ea5333671e3c661beef14e00620c0709d4854
7
+ data.tar.gz: 445a987401f542e2c3256075f54c36077c49126ca7226beb2cf154393fa1487b61310f6b4d9cb32374840be3c660ddefd3812c1891e84ccd5cf152dea1d7970c
data/muncraft.rb ADDED
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'net/http'
4
+ require 'uri'
5
+ require 'nokogiri'
6
+ require 'open-uri'
7
+
8
+ url = 'https://www.set.or.th/set/companyhighlight.do?symbol=DELTA'
9
+ doc = Nokogiri::HTML.parse(URI.open(url))
10
+ tags = doc.xpath('//td')
11
+ tags.each_with_index do |tag, i|
12
+ print "#{doc.xpath('//h3').text} : #{tags[i + 4].text}\n" if tag.text == 'สินทรัพย์รวม'
13
+ end
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: muncraft
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.2
5
+ platform: ruby
6
+ authors:
7
+ - Sahatsawat Kanpai
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-02-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple hello world gem
14
+ email: keyboard2543@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - muncraft.rb
20
+ homepage: https://rubygems.org/gems/hola
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.0.3
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: muncraft!
43
+ test_files: []