Class: SiriProxy::Plugin::Sancho
- Inherits:
-
SiriProxy::Plugin
- Object
- SiriProxy::Plugin
- SiriProxy::Plugin::Sancho
- Defined in:
- lib/siriproxy-sancho.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Sancho
constructor
A new instance of Sancho.
- #show_fashion_weekend ⇒ Object
Constructor Details
#initialize(config) ⇒ Sancho
Returns a new instance of Sancho.
11 12 |
# File 'lib/siriproxy-sancho.rb', line 11 def initialize(config) end |
Instance Method Details
#show_fashion_weekend ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/siriproxy-sancho.rb', line 14 def show_fashion_weekend # TODO # 未来这些数据要来源于数据库或者API magzines = %w{140_03fmrw.pdf 140_04-05st.pdf 140_06-07rw.pdf 140_12-13.pdf 140_13.pdf 140_fm.pdf}.map{|path| "http://42.121.89.18/pdf/#{path}"} add_views = SiriAddViews.new add_views.make_root(last_ref_id) answer = SiriAnswer.new("这是最近几期的《时尚周末》", magzines.map{|m| SiriAnswerLine.new(m)}) add_views.views << SiriAnswerSnippet.new([answer]) send_object add_views end |