Class: KintoneNotifier::Bot
- Inherits:
-
Object
- Object
- KintoneNotifier::Bot
- Defined in:
- lib/kintone_notifier/bot.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Bot
constructor
A new instance of Bot.
- #tweet(values = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Bot
Returns a new instance of Bot.
4 5 6 7 8 |
# File 'lib/kintone_notifier/bot.rb', line 4 def initialize(={}) raise ArgumentError, "invalid argument. class configuration haven't been given." if @@config.blank? @options = .reverse_merge() @api = Kintone::Api.new(@options["url"],@options["user"],@options["password"]) end |
Class Method Details
.config=(h) ⇒ Object
13 14 15 |
# File 'lib/kintone_notifier/bot.rb', line 13 def self.config=(h) @@config = h end |
Instance Method Details
#tweet(values = {}) ⇒ Object
9 10 11 |
# File 'lib/kintone_notifier/bot.rb', line 9 def tweet(values={}) @api.record.create(@options["app_id"],convert_hash(values.reverse_merge(default_values))) end |