Class: SyoboiCalendar::Resources::TitleResource

Inherits:
BaseResource
  • Object
show all
Defined in:
lib/syoboi_calendar/resources/title_resource.rb

Instance Attribute Summary

Attributes inherited from BaseResource

#source

Instance Method Summary collapse

Methods inherited from BaseResource

#initialize, #updated_at

Constructor Details

This class inherits a constructor from SyoboiCalendar::Resources::BaseResource

Instance Method Details

#castsArray<SyoboiCalendar::Personality>

Returns:



23
24
25
26
27
28
29
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 23

def casts
  if comment
    comment.casts
  else
    []
  end
end

#category_idInteger?

Note:

0: その他 1: アニメ 2: ラジオ 3: テレビ 4: 特撮 5: アニメ関連 6: メモ 7: OVA 8: 映画

10: アニメ(終了/再放送)

Returns:

  • (Integer, nil)


16
17
18
19
20
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 16

def category_id
  if source["Cat"]
    source["Cat"].to_i
  end
end

#commentSyoboiCalendar::Comment?

Returns:



32
33
34
35
36
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 32

def comment
  if source["Comment"]
    ::SyoboiCalendar::Comment.new(source["Comment"])
  end
end

#english_nameString?

Returns:

  • (String, nil)


39
40
41
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 39

def english_name
  source["TitleEN"]
end

#first_channelString?

Returns:

  • (String, nil)


44
45
46
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 44

def first_channel
  source["FirstCh"]
end

#first_end_monthInteger?

Returns:

  • (Integer, nil)


49
50
51
52
53
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 49

def first_end_month
  if source["FirstEndMonth"]
    source["FirstEndMonth"].to_i
  end
end

#first_end_yearInteger?

Returns:

  • (Integer, nil)


56
57
58
59
60
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 56

def first_end_year
  if source["FirstEndYear"]
    source["FirstEndYear"].to_i
  end
end

#first_monthInteger?

Returns:

  • (Integer, nil)


63
64
65
66
67
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 63

def first_month
  if source["FirstMonth"]
    source["FirstMonth"].to_i
  end
end

#first_yearInteger?

Returns:

  • (Integer, nil)


70
71
72
73
74
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 70

def first_year
  if source["FirstYear"]
    source["FirstYear"].to_i
  end
end

#flagInteger?

Returns:

  • (Integer, nil)


77
78
79
80
81
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 77

def flag
  if source["TitleFlag"]
    source["TitleFlag"].to_i
  end
end

#idInteger?

Returns:

  • (Integer, nil)


84
85
86
87
88
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 84

def id
  if source["TID"]
    source["TID"].to_i
  end
end

#kanaString?

Returns:

  • (String, nil)


91
92
93
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 91

def kana
  source["TitleYomi"]
end

#keywordsString?

Returns:

  • (String, nil)


96
97
98
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 96

def keywords
  source["Keywords"]
end

#nameString?

Returns:

  • (String, nil)


101
102
103
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 101

def name
  source["Title"]
end

#short_titleString?

Returns:

  • (String, nil)


142
143
144
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 142

def short_title
  source["ShortTitle"]
end

#songs_endingArray<SyoboiCalendar::Song>

Returns:



106
107
108
109
110
111
112
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 106

def songs_ending
  if comment
    comment.songs_ending
  else
    []
  end
end

#songs_insertedArray<SyoboiCalendar::Song>

Returns:



115
116
117
118
119
120
121
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 115

def songs_inserted
  if comment
    comment.songs_inserted
  else
    []
  end
end

#songs_openingArray<SyoboiCalendar::Song>

Returns:



124
125
126
127
128
129
130
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 124

def songs_opening
  if comment
    comment.songs_opening
  else
    []
  end
end

#songs_themeArray<SyoboiCalendar::Song>

Returns:



133
134
135
136
137
138
139
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 133

def songs_theme
  if comment
    comment.songs_theme
  else
    []
  end
end

#staffsArray<SyoboiCalendar::Personality>

Returns:



147
148
149
150
151
152
153
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 147

def staffs
  if comment
    comment.staffs
  else
    []
  end
end

#sub_titlesString?

Returns:

  • (String, nil)


156
157
158
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 156

def sub_titles
  source["SubTitles"]
end

#user_pointInteger?

Returns:

  • (Integer, nil)


161
162
163
164
165
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 161

def user_point
  if source["UserPoint"]
    source["UserPoint"].to_i
  end
end

#user_point_rankInteger?

Returns:

  • (Integer, nil)


168
169
170
171
172
# File 'lib/syoboi_calendar/resources/title_resource.rb', line 168

def user_point_rank
  if source["UserPointRank"]
    source["UserPointRank"].to_i
  end
end