Class: Woro::Adapters::Base
- Inherits:
-
Object
- Object
- Woro::Adapters::Base
- Includes:
- Commander::UI
- Defined in:
- lib/woro/adapters/base.rb
Direct Known Subclasses
Class Method Summary collapse
-
.create_initial_remote_task(app_name, access_token = nil) ⇒ Object
Creates an initial welcome gist on project setup initial welcome message.
Instance Method Summary collapse
-
#extract_description(content) ⇒ Object
Extract description from file content string.
-
#list_contents ⇒ Hash
Returns the list of files included in the Gist.
-
#list_files ⇒ Array
Returns the list of files included in the Gist.
-
#push(task) ⇒ Object
Push this task’s file content to the Gist collection on the server.
-
#raw_url(file_name) ⇒ String
The raw url is a permalink for downloading the content rake task within the Gist as a file.
Class Method Details
.create_initial_remote_task(app_name, access_token = nil) ⇒ Object
Creates an initial welcome gist on project setup initial welcome message
36 37 38 |
# File 'lib/woro/adapters/base.rb', line 36 def self.create_initial_remote_task(app_name, access_token = nil) # not implemented end |
Instance Method Details
#extract_description(content) ⇒ Object
Extract description from file content string.
- String
-
description string
10 11 12 |
# File 'lib/woro/adapters/base.rb', line 10 def extract_description(content) Woro::TaskList.extract_description content end |
#list_contents ⇒ Hash
Returns the list of files included in the Gist
22 23 24 |
# File 'lib/woro/adapters/base.rb', line 22 def list_contents fail('Requires implementation') end |
#list_files ⇒ Array
Returns the list of files included in the Gist
16 17 18 |
# File 'lib/woro/adapters/base.rb', line 16 def list_files fail('Requires implementation') end |
#push(task) ⇒ Object
Push this task’s file content to the Gist collection on the server. Existing contents by the same #file_name will be overriden, but can be accessed via Github or Gist’s API.
29 30 31 |
# File 'lib/woro/adapters/base.rb', line 29 def push(task) fail('Requires implementation') end |
#raw_url(file_name) ⇒ String
The raw url is a permalink for downloading the content rake task within the Gist as a file.
44 45 46 |
# File 'lib/woro/adapters/base.rb', line 44 def raw_url(file_name) fail('Requires implementation') end |