swifty_enum 0.1.0
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/.gitignore +56 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/Guardfile +48 -0
- data/LICENSE.txt +21 -0
- data/README.md +103 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/swifty_enum/messages.rb +7 -0
- data/lib/swifty_enum/version.rb +3 -0
- data/lib/swifty_enum.rb +81 -0
- data/swifty_enum.gemspec +36 -0
- metadata +225 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c7b37736e962e666fac20dde01e00d94c34a421e
|
4
|
+
data.tar.gz: f1be1fa88e133483eb4affa4393f0ac89576fd4e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: daa3d52ab3e1d5ab6b2c49f47087473f4319346ebd78160187a8148af6a455bb9d3cfe4164a9fcc422d0cf346dd1710f2b493c2c5c1252db5886ade5221c3e62
|
7
|
+
data.tar.gz: d4dc35932be33c9d749114da3ab124c668c3664c84820e70ee11151efe6a89932adace51a3c12d3a6d8d9eb15e1c44fcd60d0bdcd5601e979e09cda7ab9c9429
|
data/.gitignore
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
|
2
|
+
# Created by https://www.gitignore.io/api/ruby
|
3
|
+
|
4
|
+
### Ruby ###
|
5
|
+
*.gem
|
6
|
+
*.rbc
|
7
|
+
/.config
|
8
|
+
/coverage/
|
9
|
+
/InstalledFiles
|
10
|
+
/pkg/
|
11
|
+
/spec/reports/
|
12
|
+
/spec/examples.txt
|
13
|
+
/test/tmp/
|
14
|
+
/test/version_tmp/
|
15
|
+
/tmp/
|
16
|
+
|
17
|
+
# Used by dotenv library to load environment variables.
|
18
|
+
# .env
|
19
|
+
|
20
|
+
## Specific to RubyMotion:
|
21
|
+
.dat*
|
22
|
+
.repl_history
|
23
|
+
build/
|
24
|
+
*.bridgesupport
|
25
|
+
build-iPhoneOS/
|
26
|
+
build-iPhoneSimulator/
|
27
|
+
|
28
|
+
## Specific to RubyMotion (use of CocoaPods):
|
29
|
+
#
|
30
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
31
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
32
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
33
|
+
#
|
34
|
+
# vendor/Pods/
|
35
|
+
|
36
|
+
## Documentation cache and generated files:
|
37
|
+
/.yardoc/
|
38
|
+
/_yardoc/
|
39
|
+
/doc/
|
40
|
+
/rdoc/
|
41
|
+
|
42
|
+
## Environment normalization:
|
43
|
+
/.bundle/
|
44
|
+
/vendor/bundle
|
45
|
+
/lib/bundler/man/
|
46
|
+
|
47
|
+
# for a library or gem, you might want to ignore these files since the code is
|
48
|
+
# intended to run in multiple environments; otherwise, check them in:
|
49
|
+
Gemfile.lock
|
50
|
+
.ruby-version
|
51
|
+
.ruby-gemset
|
52
|
+
|
53
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
54
|
+
.rvmrc
|
55
|
+
|
56
|
+
# End of https://www.gitignore.io/api/ruby
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
5
|
+
# directories %w(app lib config test spec features) \
|
6
|
+
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
+
|
8
|
+
## Note: if you are using the `directories` clause above and you are not
|
9
|
+
## watching the project directory ('.'), then you will want to move
|
10
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
+
#
|
12
|
+
# $ mkdir config
|
13
|
+
# $ mv Guardfile config/
|
14
|
+
# $ ln -s config/Guardfile .
|
15
|
+
#
|
16
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
+
|
18
|
+
guard :minitest do
|
19
|
+
# with Minitest::Unit
|
20
|
+
watch(%r{^test/(.*)\/?test_(.*)\.rb$})
|
21
|
+
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
22
|
+
watch(%r{^test/test_helper\.rb$}) { 'test' }
|
23
|
+
|
24
|
+
# with Minitest::Spec
|
25
|
+
# watch(%r{^spec/(.*)_spec\.rb$})
|
26
|
+
# watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
27
|
+
# watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
|
28
|
+
|
29
|
+
# Rails 4
|
30
|
+
# watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
31
|
+
# watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
|
32
|
+
# watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
|
33
|
+
# watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
|
34
|
+
# watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
|
35
|
+
# watch(%r{^test/.+_test\.rb$})
|
36
|
+
# watch(%r{^test/test_helper\.rb$}) { 'test' }
|
37
|
+
|
38
|
+
# Rails < 4
|
39
|
+
# watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
|
40
|
+
# watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
|
41
|
+
# watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
|
42
|
+
end
|
43
|
+
|
44
|
+
guard :yard do
|
45
|
+
watch(%r{app/(.*/)?([^/]+)\.rb})
|
46
|
+
watch(%r{lib/(.*/)?([^/]+)\.rb})
|
47
|
+
end
|
48
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 zeero
|
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,103 @@
|
|
1
|
+
# SwiftyEnum
|
2
|
+
|
3
|
+
SwiftyEnum enable defining enums in Ruby. Enums behave like Swift enums.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'swifty_enum'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install swifty_enum
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
|
25
|
+
# Define enum class.
|
26
|
+
class Flag
|
27
|
+
|
28
|
+
# Required: Include SwiftyEnum module.
|
29
|
+
include SwiftyEnum
|
30
|
+
|
31
|
+
# Now you can define enum case by 'def_case' statement.
|
32
|
+
# Usage: def_case CASE_NAME [RAWVALUE]
|
33
|
+
def_case 'On', '1'
|
34
|
+
def_case 'Off', '0'
|
35
|
+
|
36
|
+
# You can also define method for each enum cases by 'def_method' statement.
|
37
|
+
# Please put this statement below all of 'def_case' statements.
|
38
|
+
# Usage: def_method METHOD_NAME { || ... }
|
39
|
+
def_method 'status' do |enum_case|
|
40
|
+
case enum_case
|
41
|
+
when Flag::On then
|
42
|
+
# You can't use return statement, but value of last statement is returned from enum method.
|
43
|
+
'OK'
|
44
|
+
when Flag::Off then
|
45
|
+
'NG'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
# Enum case is defined as subclass.
|
52
|
+
Flag::On # => Flag::On
|
53
|
+
|
54
|
+
# Enum case has class method 'hashvalue'.
|
55
|
+
# It is incremental value by enum case definition.
|
56
|
+
Flag::On.hashvalue # => 0
|
57
|
+
|
58
|
+
# Enum case has class method 'rawvalue'.
|
59
|
+
# If rawvalue is not given in definition, hashvalue is used instead.
|
60
|
+
Flag::On.rawvalue # => '1'
|
61
|
+
|
62
|
+
# Enum case can be gotten by 'get' method with rawvalue.
|
63
|
+
Flag.get('1') # => Flag::On
|
64
|
+
Flag.get('0') # => Flag::Off
|
65
|
+
|
66
|
+
# If invalid rawvalue is given, 'get' method returns nil.
|
67
|
+
Flag.get('2') # => nil
|
68
|
+
|
69
|
+
# Enum case can be handled with case-when statement.
|
70
|
+
on = Flag.get('1')
|
71
|
+
case on
|
72
|
+
when Flag::Off then
|
73
|
+
puts 'NG'
|
74
|
+
when Flag::On then
|
75
|
+
puts 'OK'
|
76
|
+
else
|
77
|
+
puts 'NG'
|
78
|
+
end
|
79
|
+
# >> OK
|
80
|
+
|
81
|
+
# Enum method is defined in each enum cases.
|
82
|
+
Flag::On.status # => 'OK'
|
83
|
+
Flag::Off.status # => 'NG'
|
84
|
+
|
85
|
+
# When you want to get all of enum cases, use 'enum_cases'.
|
86
|
+
Flag.enum_cases # => [Flag::On, Flag::Off]
|
87
|
+
|
88
|
+
```
|
89
|
+
|
90
|
+
## Development
|
91
|
+
|
92
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
93
|
+
|
94
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
95
|
+
|
96
|
+
## Contributing
|
97
|
+
|
98
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/zeero/ruby-swifty_enum.
|
99
|
+
|
100
|
+
## License
|
101
|
+
|
102
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
103
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "swifty_enum"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
module SwiftyEnum
|
2
|
+
module Messages
|
3
|
+
ERR_DUPLICATE_ENUM_RAWVALUE = 'error: enum rawvalue "%s" has already defined'
|
4
|
+
ERR_DEF_METHOD_WITHOUT_BLOCK = 'error: "def_method" needs block'
|
5
|
+
ERR_DEF_METHOD_FOR_EMPTY = 'error: you trying to define enum method, but there is no defined enum case'
|
6
|
+
end
|
7
|
+
end
|
data/lib/swifty_enum.rb
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
# Module to be included in enum class.
|
2
|
+
#
|
3
|
+
# @author zeero
|
4
|
+
|
5
|
+
require "swifty_enum/version"
|
6
|
+
require "swifty_enum/messages"
|
7
|
+
|
8
|
+
module SwiftyEnum
|
9
|
+
def self.included(klass)
|
10
|
+
klass.extend ClassMethods
|
11
|
+
end
|
12
|
+
|
13
|
+
module ClassMethods
|
14
|
+
|
15
|
+
# define enum case as subclass
|
16
|
+
# @param [String] name enum case name
|
17
|
+
# @param [Object] rawvalue enum case rawvalue
|
18
|
+
# @raise [RuntimeError] SwiftyEnum::Messages::ERR_DUPLICATE_ENUM_RAWVALUE
|
19
|
+
def def_case(name, rawvalue = nil)
|
20
|
+
@_enum_hash ||= {}
|
21
|
+
hashvalue = @_enum_hash.size
|
22
|
+
rawvalue ||= hashvalue
|
23
|
+
|
24
|
+
# check rawvalue is unique
|
25
|
+
if @_enum_hash.has_key? rawvalue
|
26
|
+
raise sprintf(SwiftyEnum::Messages::ERR_DUPLICATE_ENUM_RAWVALUE, rawvalue)
|
27
|
+
end
|
28
|
+
|
29
|
+
klass = Class.new
|
30
|
+
klass.define_singleton_method 'hashvalue' do
|
31
|
+
return hashvalue
|
32
|
+
end
|
33
|
+
klass.define_singleton_method 'rawvalue' do
|
34
|
+
return rawvalue
|
35
|
+
end
|
36
|
+
klass.define_singleton_method '===' do |rhs|
|
37
|
+
return klass == rhs
|
38
|
+
end
|
39
|
+
const_set :"#{name}", klass
|
40
|
+
|
41
|
+
@_enum_hash[rawvalue] = klass
|
42
|
+
end
|
43
|
+
|
44
|
+
# define enum method
|
45
|
+
# @param [String] name enum method name
|
46
|
+
def def_method(name)
|
47
|
+
@_enum_hash ||= {}
|
48
|
+
|
49
|
+
# check block given
|
50
|
+
if ! block_given?
|
51
|
+
raise SwiftyEnum::Messages::ERR_DEF_METHOD_WITHOUT_BLOCK
|
52
|
+
end
|
53
|
+
|
54
|
+
# check defined enum case existing
|
55
|
+
if @_enum_hash.empty?
|
56
|
+
raise SwiftyEnum::Messages::ERR_DEF_METHOD_FOR_EMPTY
|
57
|
+
end
|
58
|
+
|
59
|
+
@_enum_hash.values.each do |klass|
|
60
|
+
klass.define_singleton_method name do
|
61
|
+
yield klass
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# get enum case
|
67
|
+
# @param [Object] rawvalue enum case rawvalue
|
68
|
+
# @return [Class] enum case
|
69
|
+
def get(rawvalue)
|
70
|
+
@_enum_hash ||= {}
|
71
|
+
return @_enum_hash.fetch rawvalue, nil
|
72
|
+
end
|
73
|
+
|
74
|
+
# get all enum cases
|
75
|
+
# @return [Array] enum cases
|
76
|
+
def enum_cases
|
77
|
+
return @_enum_hash.values
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
data/swifty_enum.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'swifty_enum/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "swifty_enum"
|
8
|
+
spec.version = SwiftyEnum::VERSION
|
9
|
+
spec.authors = ["zeero"]
|
10
|
+
spec.email = ["zeero26@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Enum for Ruby with Swift style.}
|
13
|
+
spec.description = %q{SwiftyEnum enable defining enums in Ruby. Enums behave like Swift enums.}
|
14
|
+
spec.homepage = "https://github.com/zeero/ruby-swifty_enum"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "pry"
|
27
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
28
|
+
spec.add_development_dependency "minitest-doc_reporter"
|
29
|
+
spec.add_development_dependency "minitest-stub_any_instance"
|
30
|
+
spec.add_development_dependency "yard"
|
31
|
+
spec.add_development_dependency "guard"
|
32
|
+
spec.add_development_dependency "guard-minitest"
|
33
|
+
spec.add_development_dependency "guard-yard"
|
34
|
+
spec.add_development_dependency "rb-fsevent"
|
35
|
+
spec.add_development_dependency "terminal-notifier-guard", "~> 1.6.1"
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,225 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: swifty_enum
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- zeero
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-03-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.13'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.13'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest-doc_reporter
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest-stub_any_instance
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: yard
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: guard
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-minitest
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: guard-yard
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rb-fsevent
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: terminal-notifier-guard
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 1.6.1
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 1.6.1
|
181
|
+
description: SwiftyEnum enable defining enums in Ruby. Enums behave like Swift enums.
|
182
|
+
email:
|
183
|
+
- zeero26@gmail.com
|
184
|
+
executables: []
|
185
|
+
extensions: []
|
186
|
+
extra_rdoc_files: []
|
187
|
+
files:
|
188
|
+
- ".gitignore"
|
189
|
+
- ".travis.yml"
|
190
|
+
- Gemfile
|
191
|
+
- Guardfile
|
192
|
+
- LICENSE.txt
|
193
|
+
- README.md
|
194
|
+
- Rakefile
|
195
|
+
- bin/console
|
196
|
+
- bin/setup
|
197
|
+
- lib/swifty_enum.rb
|
198
|
+
- lib/swifty_enum/messages.rb
|
199
|
+
- lib/swifty_enum/version.rb
|
200
|
+
- swifty_enum.gemspec
|
201
|
+
homepage: https://github.com/zeero/ruby-swifty_enum
|
202
|
+
licenses:
|
203
|
+
- MIT
|
204
|
+
metadata: {}
|
205
|
+
post_install_message:
|
206
|
+
rdoc_options: []
|
207
|
+
require_paths:
|
208
|
+
- lib
|
209
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
210
|
+
requirements:
|
211
|
+
- - ">="
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: '0'
|
214
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
|
+
requirements:
|
216
|
+
- - ">="
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: '0'
|
219
|
+
requirements: []
|
220
|
+
rubyforge_project:
|
221
|
+
rubygems_version: 2.5.1
|
222
|
+
signing_key:
|
223
|
+
specification_version: 4
|
224
|
+
summary: Enum for Ruby with Swift style.
|
225
|
+
test_files: []
|