Class: Guard::Blogger

Inherits:
Plugin
  • Object
show all
Includes:
Blogger::Helpers, Capybara::DSL
Defined in:
lib/guard/blogger.rb

Constant Summary

Constants included from Blogger::Helpers

Blogger::Helpers::DEFAULT_TEMPLATE, Blogger::Helpers::ESCAPE_MAP

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Blogger::Helpers

#default_template, #escape_template

Constructor Details

#initialize(options = {}) ⇒ Blogger

Returns a new instance of Blogger.



13
14
15
16
17
18
19
20
21
22
# File 'lib/guard/blogger.rb', line 13

def initialize(options = {})
  super

  Capybara.default_driver = :selenium
  Capybara.app_host       = "https://www.blogger.com"

  @email    = options[:email]
  @password = options[:password]
  @blog     = options[:blog]
end

Instance Attribute Details

#blogObject (readonly)

Returns the value of attribute blog.



11
12
13
# File 'lib/guard/blogger.rb', line 11

def blog
  @blog
end

#emailObject (readonly)

Returns the value of attribute email.



11
12
13
# File 'lib/guard/blogger.rb', line 11

def email
  @email
end

#passwordObject (readonly)

Returns the value of attribute password.



11
12
13
# File 'lib/guard/blogger.rb', line 11

def password
  @password
end

Instance Method Details

#run_on_changes(paths) ⇒ Object



28
29
30
# File 'lib/guard/blogger.rb', line 28

def run_on_changes(paths)
  update_template(paths.first)
end

#startObject



24
25
26
# File 'lib/guard/blogger.rb', line 24

def start
  
end