Class: SlackBigEmoji::Uploader

Inherits:
Object
  • Object
show all
Defined in:
lib/slack_big_emoji/uploader.rb

Constant Summary collapse

BASE_DIR =
File.expand_path(File.dirname(__FILE__))

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dir) ⇒ Uploader

Returns a new instance of Uploader.



9
10
11
12
13
# File 'lib/slack_big_emoji/uploader.rb', line 9

def initialize(dir)
  @dir = dir
  @page = nil
  @agent = Mechanize.new
end

Instance Attribute Details

#agentObject

Returns the value of attribute agent.



14
15
16
# File 'lib/slack_big_emoji/uploader.rb', line 14

def agent
  @agent
end

#pageObject

Returns the value of attribute page.



14
15
16
# File 'lib/slack_big_emoji/uploader.rb', line 14

def page
  @page
end

Instance Method Details

#upload_emojisObject



16
17
18
19
# File 'lib/slack_big_emoji/uploader.rb', line 16

def upload_emojis
  move_to_emoji_page
  push_emojis
end