Class: Impostor
- Inherits:
-
Object
- Object
- Impostor
- Defined in:
- lib/impostor/wwf79.rb,
lib/impostor.rb,
lib/impostor/wwf80.rb,
lib/impostor/errors.rb,
lib/impostor/phpbb2.rb,
lib/impostor/phpbb3.rb
Overview
phpBB3 version of the Impostor
Defined Under Namespace
Modules: Phpbb2, Phpbb3, Wwf79, Wwf80 Classes: Auth, Config, ConfigError, ImpostorError, LoginError, MissingTemplateMethodError, Post, PostError, PostModerated, ThrottledError, Topic, TopicError, TopicModerated
Constant Summary collapse
- VERSION =
Gem version of Impostor
'1.3.2'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ Impostor
constructor
Pass in a config hash to initialize.
-
#login ⇒ Object
Login.
-
#new_topic(forum, subject, message) ⇒ Object
Make a new topic.
-
#post(forum, topic, message) ⇒ Object
Post the message.
-
#version ⇒ Object
our version.
Constructor Details
#initialize(config = {}) ⇒ Impostor
Pass in a config hash to initialize
58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/impostor.rb', line 58 def initialize(config={}) @config = Config.new(config) @auth = Auth.new(@config) @post = Post.new(@config, @auth) @topic = Topic.new(@config, @auth) type = @config.type raise ConfigError.new("Missing 'type' key in configuration") unless type extend eval("Impostor::#{type.to_s.capitalize}") end |
Class Method Details
.not_tested(who, what) ⇒ Object
98 99 100 101 102 103 104 105 |
# File 'lib/impostor.rb', line 98 def self.not_tested(who, what) warn <<WARNMSG !!!!! IMPLEMENTATION WARNING !!!!! #{who}##{what} did not have real integration test data to work against in the refactoring of Impostor from version 0.2.1 to 1.0.0. Please contact the author to help supply live data allowing real integration tests for this method. WARNMSG end |
Instance Method Details
#login ⇒ Object
Login
94 95 96 |
# File 'lib/impostor.rb', line 94 def login @auth.login end |
#new_topic(forum, subject, message) ⇒ Object
Make a new topic
87 88 89 |
# File 'lib/impostor.rb', line 87 def new_topic(forum, subject, ) @topic.new_topic(forum, subject, ) end |
#post(forum, topic, message) ⇒ Object
Post the message
80 81 82 |
# File 'lib/impostor.rb', line 80 def post(forum, topic, ) @post.post(forum, topic, ) end |