Class: Houcho::CI::IkachanClient
- Inherits:
-
Object
- Object
- Houcho::CI::IkachanClient
- Defined in:
- lib/houcho/ci.rb
Instance Method Summary collapse
-
#initialize(channel, server, port = 4979) ⇒ IkachanClient
constructor
A new instance of IkachanClient.
-
#post(message) ⇒ Object
return が @ikachan_channels の最後の要素だけになってるからどうにかする.
Constructor Details
#initialize(channel, server, port = 4979) ⇒ IkachanClient
Returns a new instance of IkachanClient.
50 51 52 53 54 |
# File 'lib/houcho/ci.rb', line 50 def initialize(channel, server, port = 4979) @ikachan_server = server @ikachan_listen_port = port @ikachan_channels = channel.is_a?(Array) ? channel : [channel] end |
Instance Method Details
#post(message) ⇒ Object
return が @ikachan_channels の最後の要素だけになってるからどうにかする
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/houcho/ci.rb', line 57 def post() @ikachan_channels.each do |channel| response = Net::HTTP.post_form( URI.parse("http://#{@ikachan_server}:#{@ikachan_listen_port}/notice"), { :channel => channel, :message => , } ) response.body end end |