Class: Guard::Blogger
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Blogger
- 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
-
#blog ⇒ Object
readonly
Returns the value of attribute blog.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Blogger
constructor
A new instance of Blogger.
- #run_on_changes(paths) ⇒ Object
- #start ⇒ Object
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( = {}) super Capybara.default_driver = :selenium Capybara.app_host = "https://www.blogger.com" @email = [:email] @password = [:password] @blog = [:blog] end |
Instance Attribute Details
#blog ⇒ Object (readonly)
Returns the value of attribute blog.
11 12 13 |
# File 'lib/guard/blogger.rb', line 11 def blog @blog end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
11 12 13 |
# File 'lib/guard/blogger.rb', line 11 def email @email end |
#password ⇒ Object (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 |
#start ⇒ Object
24 25 26 |
# File 'lib/guard/blogger.rb', line 24 def start sign_in end |