Module: Kublog::Network::Twitter::InstanceMethods

Defined in:
lib/kublog/network/twitter.rb

Instance Method Summary collapse

Instance Method Details

#default_twitterObject

It’s activated by default when a new post is created but not when editing the post



19
20
21
# File 'lib/kublog/network/twitter.rb', line 19

def default_twitter
  post.new_record?
end

#deliver_twitterObject

Calls processor to work on delivering the tweet



13
14
15
# File 'lib/kublog/network/twitter.rb', line 13

def deliver_twitter
  Processor.work(Tweet.new(self.content, self.url))
end

#twitter?Boolean

Returns true when the notification behaves like a twitter notification

Returns:

  • (Boolean)


25
26
27
# File 'lib/kublog/network/twitter.rb', line 25

def twitter?
  self.kind == 'twitter'
end