meibo 0.4.0 → 0.6.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: 85e154ac4b2a7d8024aaba771a1ac76a140e10312feff637d619563b8a33359e
4
- data.tar.gz: 8b5dc9b930b63cc8070b67922fc4329dddcef38785da4ca1a5d6dcdf8ac3ed09
3
+ metadata.gz: ee98db67f94bba31bd48233fa71065f84b4746b8b4b642e7eafe0146b6520697
4
+ data.tar.gz: de476c94b10aac629e4e4455fb68531ce4446111a857c1a32fb6403e5018502f
5
5
  SHA512:
6
- metadata.gz: 83ac0e760543faf79913f46e8bf84f834b56ab1347f049d437e49f2b8a0c8a962231f0fd91d6b0fc5928906d9c63a4a95fa7a941608deed9e60f7a496c5175fa
7
- data.tar.gz: 78ec60730afb5877b9b6cd19a6f0bddf92882c12711b68014ed5c4044606cdcb18781daef7b7017a2ac2c6610a9410a3223e1a7cf63abca6d7c3b7c282cc2444
6
+ metadata.gz: b999a02ae324f9a8a7b00e2b080c91e3b4d6b9a495801a154108fbbe402a31e4a1b0943fb1a9a4806594534dbcd7f3a7301e360d021e221ba006f1f353dea3ae
7
+ data.tar.gz: acdb373e0e411ab84df2a2cb762aea90fe6c702cc95f6a182370a77ec56c25ac008c7f9549ca5bcccfcb72895c0c83faaae60b565c0a4051faba7f7badd2416f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meibo (0.4.0)
4
+ meibo (0.6.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
@@ -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
@@ -33,7 +33,7 @@ module Meibo
33
33
  }
34
34
  )
35
35
 
36
- def initialize(sourced_id:, status: nil, date_last_modified: nil, class_sourced_id:, school_sourced_id:, user_sourced_id:, role:, primary: nil, begin_date: nil, end_date: nil, shusseki_no: nil, public_flg: nil, **extension_fields)
36
+ def initialize(sourced_id:, status: nil, date_last_modified: nil, class_sourced_id:, school_sourced_id:, user_sourced_id:, role:, primary: nil, begin_date: nil, end_date: nil, **extension_fields)
37
37
  @sourced_id = sourced_id
38
38
  @status = status
39
39
  @date_last_modified = date_last_modified
@@ -43,9 +43,23 @@ module Meibo
43
43
  @role = role
44
44
  @begin_date = begin_date
45
45
  @end_date = end_date
46
- @shusseki_no = shusseki_no
47
- @public_flg = public_flg
48
46
  @extension_fields = extension_fields
49
47
  end
48
+
49
+ def administrator?
50
+ role == ROLES[:administrator]
51
+ end
52
+
53
+ def proctor?
54
+ role == ROLES[:proctor]
55
+ end
56
+
57
+ def student?
58
+ role == ROLES[:student]
59
+ end
60
+
61
+ def teacher?
62
+ role == ROLES[:teacher]
63
+ end
50
64
  end
51
65
  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.4.0"
4
+ VERSION = "0.6.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.4.0
4
+ version: 0.6.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.4.0/CHANGELOG.md
128
+ changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.6.0/CHANGELOG.md
129
129
  post_install_message:
130
130
  rdoc_options: []
131
131
  require_paths: