meibo 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30d0a69e4f0c29d2454a59deeac497b6315ad82e927c1eb30dfcd9d764807d1b
4
- data.tar.gz: fb1883792099051fa89c6f7a66689bc661ddbd3fdb21b157d91d559368383b2f
3
+ metadata.gz: a9a62c4aa9e3b8eab409ec63beb7d05679357c1ed5b00c2f8d636a6e1dc0b0a5
4
+ data.tar.gz: ced2629cdf7af8dd09589938fa8df4f16d16b7ee99f324ed573a0005514bd9e2
5
5
  SHA512:
6
- metadata.gz: 201f65ec64a3066ea7b594aad1638c3edc6b9868c351d1f1b8cc479070820dedac5435cec4a30fa450daa71d1e5a5caa3a2d0c1318c5522aa4a9902ec2eb2e70
7
- data.tar.gz: d423b6be73f4d365dd9de6fe97ea9bc4ce3c2373086db58dc2958aa0fae967db20fa153f39371c3b63ab4735ccc355cc6ef2e78f7bcb25187d38a3df1055d164
6
+ metadata.gz: 1edf8f4c409dd84280b1c97bc947af3395504b46f046983e358e3eba1e811c0f725130cce28851b23e1314beef78a07ed07e557753b1b85dffd2488dbc191d21
7
+ data.tar.gz: 7f2a21335e41b284e288fd2b72032ead11e7df8287d671e48f42c350f513ea7856fa636a0e7026276e9621aa75c8b5282db91617c7398fb4c835ef89280c2c4e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meibo (0.3.0)
4
+ meibo (0.5.0)
5
5
  rubyzip
6
6
  zeitwerk
7
7
 
@@ -44,5 +44,21 @@ module Meibo
44
44
  @school_year = school_year
45
45
  @extension_fields = extension_fields
46
46
  end
47
+
48
+ def grading_period?
49
+ type == TYPES[:grading_period]
50
+ end
51
+
52
+ def semester?
53
+ type == TYPES[:semester]
54
+ end
55
+
56
+ def school_year?
57
+ type == TYPES[:school_year]
58
+ end
59
+
60
+ def term?
61
+ type == TYPES[:term]
62
+ end
47
63
  end
48
64
  end
@@ -63,5 +63,13 @@ module Meibo
63
63
  @periods = periods
64
64
  @extension_fields = extension_fields
65
65
  end
66
+
67
+ def homeroom?
68
+ class_type == TYPES[:homeroom]
69
+ end
70
+
71
+ def scheduled?
72
+ class_type == TYPES[:scheduled]
73
+ end
66
74
  end
67
75
  end
@@ -1,5 +1,7 @@
1
1
  module Meibo
2
2
  class DataSet
3
+ include Enumerable
4
+
3
5
  attr_reader :roster
4
6
 
5
7
  def initialize(data, roster:)
@@ -39,9 +41,5 @@ module Meibo
39
41
  rescue KeyError
40
42
  raise DataNotFoundError, "sourcedId: #{sourced_id} が見つかりません"
41
43
  end
42
-
43
- def to_a
44
- @data
45
- end
46
44
  end
47
45
  end
@@ -66,5 +66,21 @@ module Meibo
66
66
  @public_school_residence_status = public_school_residence_status
67
67
  @extension_fields = extension_fields
68
68
  end
69
+
70
+ def male?
71
+ sex == SEX[:male]
72
+ end
73
+
74
+ def female?
75
+ sex == SEX[:female]
76
+ end
77
+
78
+ def unspecified?
79
+ sex == SEX[:unspecified]
80
+ end
81
+
82
+ def other?
83
+ sex == SEX[:other]
84
+ end
69
85
  end
70
86
  end
@@ -47,5 +47,21 @@ module Meibo
47
47
  @public_flg = public_flg
48
48
  @extension_fields = extension_fields
49
49
  end
50
+
51
+ def administrator?
52
+ role == ROLES[:administrator]
53
+ end
54
+
55
+ def proctor?
56
+ role == ROLES[:proctor]
57
+ end
58
+
59
+ def student?
60
+ role == ROLES[:student]
61
+ end
62
+
63
+ def teacher?
64
+ role == ROLES[:teacher]
65
+ end
50
66
  end
51
67
  end
@@ -30,6 +30,10 @@ module Meibo
30
30
  @shusseki_no = shusseki_no
31
31
  @public_flg = public_flg
32
32
  end
33
+
34
+ def guardian?
35
+ role == ROLES[:guardian]
36
+ end
33
37
  end
34
38
  end
35
39
  end
@@ -40,5 +40,29 @@ module Meibo
40
40
  @parent_sourced_id = parent_sourced_id
41
41
  @extension_fields = extension_fields
42
42
  end
43
+
44
+ def department?
45
+ type == TYPES[:department]
46
+ end
47
+
48
+ def school?
49
+ type == TYPES[:school]
50
+ end
51
+
52
+ def district?
53
+ type == TYPES[:district]
54
+ end
55
+
56
+ def local?
57
+ type == TYPES[:local]
58
+ end
59
+
60
+ def state?
61
+ type == TYPES[:state]
62
+ end
63
+
64
+ def national?
65
+ type == TYPES[:national]
66
+ end
43
67
  end
44
68
  end
data/lib/meibo/role.rb CHANGED
@@ -69,5 +69,53 @@ module Meibo
69
69
  def secondary?
70
70
  @role_type == TYPES['secondary']
71
71
  end
72
+
73
+ def aide?
74
+ role == ROLES[:aide]
75
+ end
76
+
77
+ def counselor?
78
+ role == ROLES[:counselor]
79
+ end
80
+
81
+ def district_administrator?
82
+ role == ROLES[:district_administrator]
83
+ end
84
+
85
+ def guardian?
86
+ role == ROLES[:guardian]
87
+ end
88
+
89
+ def parent?
90
+ role == ROLES[:parent]
91
+ end
92
+
93
+ def principal?
94
+ role == ROLES[:principal]
95
+ end
96
+
97
+ def proctor?
98
+ role == ROLES[:proctor]
99
+ end
100
+
101
+ def relative?
102
+ role == ROLES[:relative]
103
+ end
104
+
105
+ def site_administrator?
106
+ role == ROLES[:site_administrator]
107
+ end
108
+
109
+ def student?
110
+ role == ROLES[:student]
111
+ end
112
+
113
+ def system_administrator?
114
+ role == ROLES[:system_administrator]
115
+ end
116
+
117
+ def teacher?
118
+ role == ROLES[:teacher]
119
+ end
72
120
  end
73
121
  end
data/lib/meibo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meibo
4
- VERSION = "0.3.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meibo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seiei Miyagi
@@ -125,7 +125,7 @@ metadata:
125
125
  allowed_push_host: https://rubygems.org/
126
126
  homepage_uri: https://github.com/hanachin/meibo
127
127
  source_code_uri: https://github.com/hanachin/meibo
128
- changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.3.0/CHANGELOG.md
128
+ changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.5.0/CHANGELOG.md
129
129
  post_install_message:
130
130
  rdoc_options: []
131
131
  require_paths: