Class: Twpipe

Inherits:
Object
  • Object
show all
Defined in:
lib/twpipe.rb,
lib/twpipe/version.rb

Overview

Twpipe

Defined Under Namespace

Classes: ConfigError

Constant Summary collapse

VERSION =
'0.0.1'

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTwpipe

Returns a new instance of Twpipe.



22
23
24
25
# File 'lib/twpipe.rb', line 22

def initialize
  setup_config
  setup_client
end

Class Attribute Details

.config_pathObject

config_path

the file path to configuration file



12
13
14
# File 'lib/twpipe.rb', line 12

def config_path
  @config_path
end

Instance Attribute Details

#clientObject (readonly)

client

twitter client that authenticated by oAuth (Twitter::Base)



20
21
22
# File 'lib/twpipe.rb', line 20

def client
  @client
end

Instance Method Details

#tweet(message) ⇒ Object

tweet your message

message: string variable that you would tweet



31
32
33
# File 'lib/twpipe.rb', line 31

def tweet(message)
  @client.update(message)
end