itkrt2y 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +38 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +7 -0
- data/bin/itkrt2y +7 -0
- data/itkrt2y.gemspec +24 -0
- data/lib/itkrt2y.rb +74 -0
- data/lib/itkrt2y/version.rb +3 -0
- data/spec/itkrt2y_spec.rb +8 -0
- data/spec/spec_helper.rb +2 -0
- metadata +102 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7cdb5305da632a12da14d260767c165f62c40f29
|
4
|
+
data.tar.gz: a6bcbb24755ada6330f1bf77ea5e77d3bed57994
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 81482f0ae7dc051db7ce3ad77cd55a2e263034185da5b1689a949137961d122ba122f31f2b67e5f3d253a229c7e1035f14f42e3f33de5da585a33c356f1ea425
|
7
|
+
data.tar.gz: 720cfba91469498a0f3f449eab67022096fc32c6e523dc9ac0d2e056e1bd50108860b944c230ff1f0dae9d3efd449ed51e1f6df7d9806fe6bcfffc6971ab52b4
|
data/.gitignore
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/Gemfile.lock
|
4
|
+
/_yardoc/
|
5
|
+
/coverage/
|
6
|
+
/doc/
|
7
|
+
/pkg/
|
8
|
+
/spec/reports/
|
9
|
+
/tmp/
|
10
|
+
*.bundle
|
11
|
+
*.so
|
12
|
+
*.o
|
13
|
+
*.a
|
14
|
+
mkmf.log
|
15
|
+
# Created by https://www.gitignore.io
|
16
|
+
|
17
|
+
### OSX ###
|
18
|
+
.DS_Store
|
19
|
+
.AppleDouble
|
20
|
+
.LSOverride
|
21
|
+
|
22
|
+
# Icon must end with two \r
|
23
|
+
Icon
|
24
|
+
|
25
|
+
# Thumbnails
|
26
|
+
._*
|
27
|
+
|
28
|
+
# Files that might appear on external disk
|
29
|
+
.Spotlight-V100
|
30
|
+
.Trashes
|
31
|
+
|
32
|
+
# Directories potentially created on remote AFP share
|
33
|
+
.AppleDB
|
34
|
+
.AppleDesktop
|
35
|
+
Network Trash Folder
|
36
|
+
Temporary Items
|
37
|
+
.apdisk
|
38
|
+
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 itkrt2y
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Itkrt2y
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'itkrt2y'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install itkrt2y
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
TODO: Write usage instructions here
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
1. Fork it ( https://github.com/[my-github-username]/itkrt2y/fork )
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/itkrt2y
ADDED
data/itkrt2y.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'itkrt2y/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "itkrt2y"
|
8
|
+
spec.version = Itkrt2y::VERSION
|
9
|
+
spec.authors = ["itkrt2y"]
|
10
|
+
spec.email = ["itkrt2y.591721200@gmail.com"]
|
11
|
+
spec.summary = %q{itkrt2y's profile}
|
12
|
+
spec.description = %q{itkrt2y's profile}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
end
|
data/lib/itkrt2y.rb
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
require "itkrt2y/version"
|
2
|
+
|
3
|
+
module Itkrt2y
|
4
|
+
def all
|
5
|
+
methods = Itkrt2y::methods(false) - [:all, :to_s]
|
6
|
+
methods.map { |method| Itkrt2y.send(method) }
|
7
|
+
end
|
8
|
+
|
9
|
+
def name
|
10
|
+
{
|
11
|
+
full_name: { title: "氏名", value: "板倉 達也" },
|
12
|
+
furigana: { title: "ふりがな", value: "いたくら たつや" }
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
def email
|
17
|
+
{ email: { title: "メールアドレス", value: "itkrt2y.591721200@gmail.com" } }
|
18
|
+
end
|
19
|
+
|
20
|
+
def education
|
21
|
+
{
|
22
|
+
junior_high_school: {
|
23
|
+
title: "中学",
|
24
|
+
name: "私立桐光学園中学校",
|
25
|
+
entrance: "2001年4月入学",
|
26
|
+
end: "2004年3月卒業"
|
27
|
+
},
|
28
|
+
high_school: {
|
29
|
+
title: "高校",
|
30
|
+
name: "私立桐光学園高等学校",
|
31
|
+
entrance: "2004年4月入学",
|
32
|
+
end: "2007年3月卒業"
|
33
|
+
},
|
34
|
+
college: {
|
35
|
+
title: "大学",
|
36
|
+
name: "東京農工大学",
|
37
|
+
faculty: "農学部",
|
38
|
+
department: "地域生態システム学科",
|
39
|
+
entrance: "2008年4月入学",
|
40
|
+
end: "2013年3月卒業"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_s(data_type = :all)
|
46
|
+
data_params = Itkrt2y.send(data_type)
|
47
|
+
|
48
|
+
string_data =
|
49
|
+
case data_params
|
50
|
+
when Array
|
51
|
+
data_params.map do |params|
|
52
|
+
format_hash(params)
|
53
|
+
end
|
54
|
+
when Hash
|
55
|
+
format_hash(data_params)
|
56
|
+
else
|
57
|
+
puts "指定した型が間違っています"
|
58
|
+
end
|
59
|
+
|
60
|
+
string_data
|
61
|
+
end
|
62
|
+
|
63
|
+
module_function :all, :name, :email, :education, :to_s
|
64
|
+
|
65
|
+
def self.format_hash(params)
|
66
|
+
params.map do |key, val|
|
67
|
+
data_keys = (val.keys - [:title])
|
68
|
+
data = data_keys.map { |k| val[k] }.join(" ")
|
69
|
+
"#{val[:title]} : #{data}\n"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
private_class_method :format_hash
|
74
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: itkrt2y
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- itkrt2y
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-30 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.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
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: rspec
|
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
|
+
description: itkrt2y's profile
|
56
|
+
email:
|
57
|
+
- itkrt2y.591721200@gmail.com
|
58
|
+
executables:
|
59
|
+
- itkrt2y
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- ".rspec"
|
65
|
+
- ".travis.yml"
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- bin/itkrt2y
|
71
|
+
- itkrt2y.gemspec
|
72
|
+
- lib/itkrt2y.rb
|
73
|
+
- lib/itkrt2y/version.rb
|
74
|
+
- spec/itkrt2y_spec.rb
|
75
|
+
- spec/spec_helper.rb
|
76
|
+
homepage: ''
|
77
|
+
licenses:
|
78
|
+
- MIT
|
79
|
+
metadata: {}
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
requirements: []
|
95
|
+
rubyforge_project:
|
96
|
+
rubygems_version: 2.4.4
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: itkrt2y's profile
|
100
|
+
test_files:
|
101
|
+
- spec/itkrt2y_spec.rb
|
102
|
+
- spec/spec_helper.rb
|