Class: TweetThat

Inherits:
Jarvis::Service show all
Defined in:
lib/jarvis/services/tweet_that.rb

Instance Attribute Summary collapse

Attributes inherited from Jarvis::Service

#message, #response

Instance Method Summary collapse

Methods inherited from Jarvis::Service

environment, #initialize, interpreter_pattern, invoke_with, #method_missing, phrases, #validate_environment

Constructor Details

This class inherits a constructor from Jarvis::Service

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Jarvis::Service

Instance Attribute Details

#last_messageObject

Returns the value of attribute last_message.



15
16
17
# File 'lib/jarvis/services/tweet_that.rb', line 15

def last_message
  @last_message
end

#tweetObject

Returns the value of attribute tweet.



15
16
17
# File 'lib/jarvis/services/tweet_that.rb', line 15

def tweet
  @tweet
end

#twitter_clientObject

Returns the value of attribute twitter_client.



15
16
17
# File 'lib/jarvis/services/tweet_that.rb', line 15

def twitter_client
  @twitter_client
end

Instance Method Details

#runObject



17
18
19
20
# File 'lib/jarvis/services/tweet_that.rb', line 17

def run
  self.tweet = post_tweet
  "Here you are, #{user_name}, #{link}"
end