Class: Postwill::Providers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/postwill/providers/base.rb

Direct Known Subclasses

Facebook, Instagram, Pinterest, Tumblr, Twitter

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



4
5
6
# File 'lib/postwill/providers/base.rb', line 4

def client
  @client
end

Instance Method Details

#call(options = {}) ⇒ Object



6
7
8
9
10
# File 'lib/postwill/providers/base.rb', line 6

def call(options = {})
  Dry::Monads::Right(post(options))
rescue Exception => error
  Dry::Monads::Left(error)
end