Class: Braspag::Poster

Inherits:
Object
  • Object
show all
Defined in:
lib/baby-braspag/poster.rb

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Poster

Returns a new instance of Poster.


3
4
5
# File 'lib/baby-braspag/poster.rb', line 3

def initialize(url)
  @request = ::HTTPI::Request.new(url)
end

Instance Method Details

#do_post(method, data) ⇒ Object


7
8
9
10
11
12
13
14
# File 'lib/baby-braspag/poster.rb', line 7

def do_post(method, data)
  @request.body = data
  configure_request

  with_logger(method) do
    ::HTTPI.post @request
  end
end