glyptic_page_object 0.0.1
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/glyptic_page_object.rb +18 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ce62439756764088edd09145615d18e8f098c740
|
4
|
+
data.tar.gz: dedbd264252bb4046a3e39059f38022bd442c51c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b3b94bfd8e562dbd71514c67b5c16b051b14cb9f02cc2af7b478813108333a8e185d55029ecceecac6059a58b7eea4303d2de6e6ab628b495844c0d648ef4b8a
|
7
|
+
data.tar.gz: 7b0acb975b74344b68c9070c9a7603f6315f3d15bc5b111f038eccb08fa3c516b4b3d16af764fcf1416696d12a9a2c84881597c06899de7da09c0c99fcb48aff
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class GlypticPageObject
|
2
|
+
|
3
|
+
def initialize(page_map, pages_loaction)
|
4
|
+
@@pages_location = pages_loaction
|
5
|
+
@@page_map = page_map
|
6
|
+
end
|
7
|
+
|
8
|
+
def load(page_key_name)
|
9
|
+
class_file_pair = @@page_map[page_key_name]
|
10
|
+
raise "Your page map does not appear to be formatted correctly for #{page_key_name}" if class_file_pair.size != 2
|
11
|
+
puts "Your page map does not appear to be formatted correctly for #{page_key_name}" if class_file_pair.size != 2
|
12
|
+
class_name = class_file_pair[0]
|
13
|
+
file_name = class_file_pair[1]
|
14
|
+
raise "No page data found for #{page_key_name}" if (file_name == nil || class_name == nil)
|
15
|
+
require_relative("#{@@pages_location}/#{file_name}")
|
16
|
+
Kernel.const_get(class_name).new
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: glyptic_page_object
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jared Sheffer
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-12-22 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: "Glyptic Page_Object - A gem which with managing and creating a page
|
14
|
+
object structure\n "
|
15
|
+
email: magus.chef@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/glyptic_page_object.rb
|
21
|
+
homepage: http://rubygems.org/gems/glyptic_page_object
|
22
|
+
licenses:
|
23
|
+
- MIT
|
24
|
+
metadata: {}
|
25
|
+
post_install_message:
|
26
|
+
rdoc_options: []
|
27
|
+
require_paths:
|
28
|
+
- lib
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
requirements: []
|
40
|
+
rubyforge_project:
|
41
|
+
rubygems_version: 2.0.14.1
|
42
|
+
signing_key:
|
43
|
+
specification_version: 4
|
44
|
+
summary: Simple Universal PageObject Library
|
45
|
+
test_files: []
|