Class: Connfu::Provisioning::Twitter

Inherits:
Channel
  • Object
show all
Defined in:
lib/connfu/provisioning/twitter.rb

Overview

This class models a connFu Twitter channel

Instance Attribute Summary collapse

Attributes inherited from Channel

#channel_type, #created_at, #uid, #updated_at

Instance Method Summary collapse

Methods inherited from Channel

#to_s, unmarshal

Constructor Details

#initialize(params) ⇒ Twitter

Returns a new instance of Twitter.



16
17
18
19
# File 'lib/connfu/provisioning/twitter.rb', line 16

def initialize(params)
  super(params)
  self.channel_type = "twitter"
end

Instance Attribute Details

#accountsObject

Twitter accounts associated to that Twitter channel



11
12
13
# File 'lib/connfu/provisioning/twitter.rb', line 11

def accounts
  @accounts
end

#filterObject

string that filters the tweets to retrieve only the desired hashtag



14
15
16
# File 'lib/connfu/provisioning/twitter.rb', line 14

def filter
  @filter
end

Instance Method Details

#to_hashObject

Creates a hash with the Twitter instance info



22
23
24
# File 'lib/connfu/provisioning/twitter.rb', line 22

def to_hash
  {"uid" => uid, "channel_type" => channel_type, "accounts" => accounts, "filter" => filter}
end