literal 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 02ab6065a85602e1f60d915cb11cf8e0505881894ec9df310f08fc9194124a77
4
+ data.tar.gz: d86ff5c802deb2896486fa016da1f851af1296be511b79f5eab779a6e7bcb169
5
+ SHA512:
6
+ metadata.gz: de1ddb15cb9172712bc0534ac4c4c09aeb8d224496e8dcfe913cb03a1f3d4496b7ceee128e0eda7f94ada97dfa16160acafbae130165e7662a6714a6e25c2e67
7
+ data.tar.gz: 59a8bebc8c29ca4b62ba2c0adb6acc03037f92589465012fcbb8edafbe3d8acb36526439c6acad3346f2e4f9210c3b33902a03395b2e1ddf7221dc3cd5d46f57
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-05-03
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at joel@drapper.me. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in strict_attributes.gemspec
6
+ gemspec
7
+
8
+ gem "zeitwerk"
9
+ gem "green_dots", git: "https://github.com/joeldrapper/green_dots.git"
data/Gemfile.lock ADDED
@@ -0,0 +1,29 @@
1
+ GIT
2
+ remote: https://github.com/joeldrapper/green_dots.git
3
+ revision: 776745d38c9523e403b445eeef8b374ffb130f8b
4
+ specs:
5
+ green_dots (0.1.0)
6
+ concurrent-ruby
7
+ zeitwerk
8
+
9
+ PATH
10
+ remote: .
11
+ specs:
12
+ literal (0.1.0)
13
+
14
+ GEM
15
+ remote: https://rubygems.org/
16
+ specs:
17
+ concurrent-ruby (1.2.2)
18
+ zeitwerk (2.6.8)
19
+
20
+ PLATFORMS
21
+ arm64-darwin-22
22
+
23
+ DEPENDENCIES
24
+ green_dots!
25
+ literal!
26
+ zeitwerk
27
+
28
+ BUNDLED WITH
29
+ 2.4.12
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Joel Drapper
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # Literal
2
+
3
+ ## Basic Usage
4
+
5
+ ### Mixin
6
+
7
+ ```ruby
8
+ class User
9
+ include Literal
10
+
11
+ attribute :name, String
12
+ attribute :age, Integer
13
+ end
14
+ ```
15
+
16
+ ### Struct
17
+
18
+ ```ruby
19
+ class Person < Literal::Struct
20
+ attribute :name, String
21
+ attribute :age, Integer
22
+ end
23
+ ```
24
+
25
+ ### Data
26
+
27
+ ```ruby
28
+ class Person < Literal::Data
29
+ attribute :name, String
30
+ attribute :age, Integer
31
+ end
32
+ ```
33
+
34
+ ## Special Types
35
+
36
+ ### Union
37
+
38
+ ```ruby
39
+ _Union(String, Symbol)
40
+ ```
41
+
42
+ ### Boolean
43
+
44
+ ```ruby
45
+ _Boolean
46
+ ```
47
+
48
+ ### Maybe
49
+
50
+ ```ruby
51
+ _Maybe(String)
52
+ ```
53
+
54
+ ### Array
55
+
56
+ ```ruby
57
+ _Array(String)
58
+ ```
59
+
60
+ ### Set
61
+
62
+ ```ruby
63
+ _Set(String)
64
+ ```
65
+
66
+ ### Enumerable
67
+
68
+ ```ruby
69
+ _Enumerable(String)
70
+ ```
71
+
72
+ ### Tuple
73
+ An Enumerable containing exactly the specified types in order.
74
+
75
+ ```ruby
76
+ _Tuple(String, Integer)
77
+ ```
78
+
79
+ ### Hash
80
+
81
+ ```ruby
82
+ _Hash(String, Integer)
83
+ ```
84
+
85
+ ### Interface
86
+ ```ruby
87
+ _Interface(:to_s)
88
+ ```
89
+
90
+ ### Class
91
+
92
+ ```ruby
93
+ _Class(RuntimeError)
94
+ ```
95
+
96
+ ### Module
97
+
98
+ ```ruby
99
+ _Module(Enumerable)
100
+ ```
101
+
102
+ ### Integer
103
+ You can of course just use `Integer` to specify an integer type. The special type `_Integer` allows you to limit that type with a range, while verifying that it's an integer and not something else that matches the range such as a float.
104
+
105
+ ```
106
+ _Integer(18..)
107
+ ```
108
+
109
+ You can use these types together.
110
+ ```ruby
111
+ _Maybe(Union(String, Symbol, Interface(:to_s), Interface(:to_str), Tuple(String, Symbol)))
112
+ ```
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
12
+ task default: :test
@@ -0,0 +1,33 @@
1
+ module Literal::Attributes
2
+ extend Literal::Types
3
+
4
+ def attribute(name, type, reader: false, writer: :private)
5
+ __attributes__ << name
6
+
7
+ writer_name = :"#{name}="
8
+ ivar_name = :"@#{name}"
9
+
10
+ define_method writer_name do |value|
11
+ raise Literal::TypeError, "Expected `#{value.inspect}` to be a `#{type.inspect}`." unless type === value
12
+ instance_variable_set(ivar_name, value)
13
+ end
14
+
15
+ private writer_name unless writer == :public
16
+
17
+ if reader
18
+ attr_reader name
19
+ private name unless reader == :public
20
+ end
21
+
22
+ name
23
+ end
24
+
25
+ def __attributes__
26
+ return @__attributes__ if defined?(@__attributes__)
27
+ @__attributes__ = superclass.is_a?(self) ? superclass.__attributes__.dup : []
28
+ end
29
+
30
+ def self.extended(base)
31
+ base.include(Literal::Initializer)
32
+ end
33
+ end
@@ -0,0 +1,12 @@
1
+ class Literal::Data < Literal::Struct
2
+ def initialize(...)
3
+ super
4
+ @attributes.each(&:freeze)
5
+ @attributes.freeze
6
+ freeze
7
+ end
8
+
9
+ def dup(**attributes)
10
+ self.class.new(**@attributes.merge(attributes))
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ module Literal::Initializer
2
+ def initialize(**attributes)
3
+ self.class.__attributes__.each do |name|
4
+ attributes[name] ||= nil
5
+ end
6
+
7
+ attributes.each do |name, value|
8
+ send("#{name}=", value)
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,22 @@
1
+ class Literal::Model
2
+ extend Literal::Types
3
+ include Literal::Initializer
4
+
5
+ def self.__attributes__
6
+ return @required_attributes if defined?(@required_attributes)
7
+ @required_attributes = superclass.is_a?(self) ? superclass.required_attributes.dup : []
8
+ end
9
+
10
+ def self.attribute(name, type)
11
+ __attributes__ << name
12
+
13
+ writer_name = :"#{name}="
14
+
15
+ define_method writer_name do |value|
16
+ raise Literal::TypeError, "Expected #{name}: `#{value.inspect}` to be: `#{type.inspect}`." unless type === value
17
+ super(value)
18
+ end
19
+
20
+ name
21
+ end
22
+ end
@@ -0,0 +1,35 @@
1
+ class Literal::Struct
2
+ extend Literal::Types
3
+ include Literal::Initializer
4
+
5
+ def initialize(...)
6
+ @attributes = {}
7
+ super
8
+ end
9
+
10
+ def self.__attributes__
11
+ return @__attributes__ if defined?(@__attributes__)
12
+ @__attributes__ = superclass.is_a?(self) ? superclass.__attributes__.dup : []
13
+ end
14
+
15
+ def self.attribute(name, type, writer: :private)
16
+ __attributes__ << name
17
+
18
+ writer_name = :"#{name}="
19
+
20
+ define_method writer_name do |value|
21
+ raise Literal::TypeError, "Expected #{name}: `#{value.inspect}` to be: `#{type.inspect}`." unless type === value
22
+ @attributes[name] = value
23
+ end
24
+
25
+ define_method name do
26
+ @attributes[name]
27
+ end
28
+
29
+ name
30
+ end
31
+
32
+ def to_h
33
+ @attributes.dup
34
+ end
35
+ end
@@ -0,0 +1,5 @@
1
+ module Literal::Types::AnyType
2
+ def self.===(value)
3
+ true
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ class Literal::Types::ArrayType
2
+ def initialize(type)
3
+ @type = type
4
+ end
5
+
6
+ def inspect
7
+ "Array(#{@type.inspect})"
8
+ end
9
+
10
+ def ===(value)
11
+ value.is_a?(::Array) && value.all? { |item| @type === item }
12
+ end
13
+ end
@@ -0,0 +1 @@
1
+ Literal::Types::BooleanType = Literal::Types::UnionType.new(true, false)
@@ -0,0 +1,13 @@
1
+ class Literal::Types::ClassType
2
+ def initialize(type)
3
+ @type = type
4
+ end
5
+
6
+ def inspect
7
+ "Class(#{@type.name})"
8
+ end
9
+
10
+ def ===(value)
11
+ value.is_a?(::Class) && (value == @type || value < @type)
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class Literal::Types::EnumerableType
2
+ def initialize(type)
3
+ @type = type
4
+ end
5
+
6
+ def inspect
7
+ "Enumerable(#{@type.inspect})"
8
+ end
9
+
10
+ def ===(value)
11
+ value.is_a?(::Enumerable) && value.all? { |item| @type === item }
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class Literal::Types::FloatType
2
+ def initialize(range)
3
+ @range = range
4
+ end
5
+
6
+ def inspect
7
+ "Float(#{@range})"
8
+ end
9
+
10
+ def ===(other)
11
+ other.is_a?(::Float) && @range === other
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ class Literal::Types::HashType
2
+ def initialize(key_type, value_type)
3
+ @key_type = key_type
4
+ @value_type = value_type
5
+ end
6
+
7
+ def inspect
8
+ "Hash(#{@key_type.inspect}, #{@value_type.inspect})"
9
+ end
10
+
11
+ def ===(value)
12
+ value.is_a?(::Hash) && value.all? { |key, value| @key_type === key && @value_type === value }
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ class Literal::Types::IntegerType
2
+ def initialize(range)
3
+ @range = range
4
+ end
5
+
6
+ def inspect
7
+ "Integer(#{@range})"
8
+ end
9
+
10
+ def ===(other)
11
+ other.is_a?(::Integer) && @range === other
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class Literal::Types::InterfaceType
2
+ def initialize(*methods)
3
+ @methods = methods
4
+ end
5
+
6
+ def inspect
7
+ "Interface(#{@methods.map(&:inspect).join(", ")})"
8
+ end
9
+
10
+ def ===(other)
11
+ @methods.all? { |method| other.respond_to?(method) }
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class Literal::Types::SetType
2
+ def initialize(type)
3
+ @type = type
4
+ end
5
+
6
+ def inspect
7
+ "Set(#{@type.inspect})"
8
+ end
9
+
10
+ def ===(value)
11
+ value.is_a?(::Set) && value.all? { |item| @type === item }
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class Literal::Types::TupleType
2
+ def initialize(*types)
3
+ @types = types
4
+ end
5
+
6
+ def inspect
7
+ "Tuple(#{@types.map(&:inspect).join(", ")})"
8
+ end
9
+
10
+ def ===(value)
11
+ value.is_a?(::Enumerable) && value.size == @types.size && value.zip(@types).all? { |value, type| type === value }
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class Literal::Types::UnionType
2
+ def initialize(*types)
3
+ @types = types
4
+ end
5
+
6
+ def inspect
7
+ "Union(#{@types.map(&:inspect).join(", ")})"
8
+ end
9
+
10
+ def ===(value)
11
+ @types.any? { |type| type === value }
12
+ end
13
+ end
@@ -0,0 +1,56 @@
1
+ module Literal::Types
2
+ def _Union(*types)
3
+ raise Literal::ArgumentError, "Union type must have at least two types." if types.size < 2
4
+ Literal::Types::UnionType.new(*types)
5
+ end
6
+
7
+ def _Array(type)
8
+ Literal::Types::ArrayType.new(type)
9
+ end
10
+
11
+ def _Set(type)
12
+ Literal::Types::SetType.new(type)
13
+ end
14
+
15
+ def _Enumerable(type)
16
+ Literal::Types::EnumerableType.new(type)
17
+ end
18
+
19
+ def _Hash(key_type, value_type)
20
+ Literal::Types::HashType.new(key_type, value_type)
21
+ end
22
+
23
+ def _Interface(*methods)
24
+ raise Literal::ArgumentError, "Interface type must have at least one method." if methods.size < 1
25
+ Literal::Types::InterfaceType.new(*methods)
26
+ end
27
+
28
+ def _Maybe(type)
29
+ _Union(type, nil)
30
+ end
31
+
32
+ def _Any
33
+ Literal::Types::AnyType
34
+ end
35
+
36
+ def _Boolean
37
+ Literal::Types::BooleanType
38
+ end
39
+
40
+ def _Class(type)
41
+ Literal::Types::ClassType.new(type)
42
+ end
43
+
44
+ def _Tuple(*types)
45
+ raise Literal::ArgumentError, "Tuple type must have at least one type." if types.size < 1
46
+ Literal::Types::TupleType.new(*types)
47
+ end
48
+
49
+ def _Integer(range)
50
+ Literal::Types::IntegerType.new(range)
51
+ end
52
+
53
+ def _Float(range)
54
+ Literal::Types::FloatType.new(range)
55
+ end
56
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Literal
4
+ VERSION = "0.1.0"
5
+ end
data/lib/literal.rb ADDED
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "literal/version"
4
+
5
+ module Literal
6
+ Loader = Zeitwerk::Loader.for_gem.tap(&:setup)
7
+
8
+ module Error; end
9
+
10
+ class TypeError < ::TypeError
11
+ include Error
12
+ end
13
+
14
+ class ArgumentError < ::ArgumentError
15
+ include Error
16
+ end
17
+ end
data/literal.gemspec ADDED
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/literal/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "literal"
7
+ spec.version = Literal::VERSION
8
+ spec.authors = ["Joel Drapper"]
9
+ spec.email = ["joel@drapper.me"]
10
+
11
+ spec.summary = "Strict Attributes is a gem that allows you to define strict attributes on your models."
12
+ spec.description = "Strict Attributes is a gem that allows you to define strict attributes on your models."
13
+ spec.homepage = "https://github.com/joeldrapper/literal"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/joeldrapper/literal"
19
+ spec.metadata["changelog_uri"] = "https://github.com/joeldrapper/literal/blob/master/CHANGELOG.md"
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(__dir__) do
24
+ `git ls-files -z`.split("\x0").reject do |f|
25
+ (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
26
+ end
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ # Uncomment to register a new dependency of your gem
33
+ # spec.add_dependency "example-gem", "~> 1.0"
34
+
35
+ # For more information and examples about making a new gem, check out our
36
+ # guide at: https://bundler.io/guides/creating_gem.html
37
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: literal
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Joel Drapper
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-05-03 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Strict Attributes is a gem that allows you to define strict attributes
14
+ on your models.
15
+ email:
16
+ - joel@drapper.me
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - CHANGELOG.md
22
+ - CODE_OF_CONDUCT.md
23
+ - Gemfile
24
+ - Gemfile.lock
25
+ - LICENSE.txt
26
+ - README.md
27
+ - Rakefile
28
+ - lib/literal.rb
29
+ - lib/literal/attributes.rb
30
+ - lib/literal/data.rb
31
+ - lib/literal/initializer.rb
32
+ - lib/literal/model.rb
33
+ - lib/literal/struct.rb
34
+ - lib/literal/types.rb
35
+ - lib/literal/types/any_type.rb
36
+ - lib/literal/types/array_type.rb
37
+ - lib/literal/types/boolean_type.rb
38
+ - lib/literal/types/class_type.rb
39
+ - lib/literal/types/enumerable_type.rb
40
+ - lib/literal/types/float_type.rb
41
+ - lib/literal/types/hash_type.rb
42
+ - lib/literal/types/integer_type.rb
43
+ - lib/literal/types/interface_type.rb
44
+ - lib/literal/types/set_type.rb
45
+ - lib/literal/types/tuple_type.rb
46
+ - lib/literal/types/union_type.rb
47
+ - lib/literal/version.rb
48
+ - literal.gemspec
49
+ homepage: https://github.com/joeldrapper/literal
50
+ licenses:
51
+ - MIT
52
+ metadata:
53
+ homepage_uri: https://github.com/joeldrapper/literal
54
+ source_code_uri: https://github.com/joeldrapper/literal
55
+ changelog_uri: https://github.com/joeldrapper/literal/blob/master/CHANGELOG.md
56
+ post_install_message:
57
+ rdoc_options: []
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 2.6.0
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ requirements: []
71
+ rubygems_version: 3.4.6
72
+ signing_key:
73
+ specification_version: 4
74
+ summary: Strict Attributes is a gem that allows you to define strict attributes on
75
+ your models.
76
+ test_files: []