Class: SyoboiCalendar::Title

Inherits:
Object
  • Object
show all
Defined in:
lib/syoboi_calendar/title.rb

Constant Summary collapse

EXT_PARAM_MAP =

(1) :method_name => “NameInSyoboiCalendarResponse” (2) :method_name => [“NameInSyoboiCalendarResponse”, callback]

{
  :cat              => "Cat",
  :comment          => "Comment",
  :first_channel    => "FirstCh",
  :first_end_month  => "FirstEndMonth",
  :first_end_year   => "FirstEndYear",
  :first_month      => "FirstMonth",
  :first_year       => "FirstYear",
  :keywords         => "Keywords",
  :short_title      => "ShortTitle",
  :subtitles        => "SubTitles",
  :title_en         => "TitleEN",
  :title_flag       => "TitleFlag",
  :title_view_count => "TitleViewCount",
  :title_yomi       => "TitleYomi",
  :user_point       => "UserPoint",
  :user_point_rank  => "UserPointRank"
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Title

NOTICE: @blob is empty hash at first For example,

If self.channel_name is called,
then update_detail is called automatically,
and @blob is updated to fill up @blob[:channel_name]


47
48
49
50
51
# File 'lib/syoboi_calendar/title.rb', line 47

def initialize(args)
  @tid  = args[:tid]
  @name = args[:name]
  @blob = {}
end

Instance Attribute Details

#tidObject (readonly)

Returns the value of attribute tid.



5
6
7
# File 'lib/syoboi_calendar/title.rb', line 5

def tid
  @tid
end

Instance Method Details

#charactersObject



57
58
59
# File 'lib/syoboi_calendar/title.rb', line 57

def characters
  voice_actor_map.keys
end

#urlObject



68
69
70
71
72
73
# File 'lib/syoboi_calendar/title.rb', line 68

def url
  @url ||= begin
    update_detail_from_comment
    @url
  end
end

#voice_actor_mapObject



61
62
63
64
65
66
# File 'lib/syoboi_calendar/title.rb', line 61

def voice_actor_map
  @voice_actor_map ||= begin
    update_detail_from_comment
    @voice_actor_map
  end
end

#voice_actorsObject



53
54
55
# File 'lib/syoboi_calendar/title.rb', line 53

def voice_actors
  voice_actor_map.values
end