Module: CodeLines
- Defined in:
- lib/codelines/adapter.rb,
lib/codelines/version.rb,
lib/codelines/codelines.rb,
lib/codelines/adapters/github.rb
Overview
–
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
++
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.3.1'
Class Attribute Summary collapse
-
.adapter ⇒ Object
readonly
Returns the value of attribute adapter.
Class Method Summary collapse
- .adapters ⇒ Object (also: list)
- .authentication(*args, &block) ⇒ Object
- .count(*args, &block) ⇒ Object
- .setup(adapter, profile) ⇒ Object
Class Attribute Details
.adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
14 15 16 |
# File 'lib/codelines/codelines.rb', line 14 def adapter @adapter end |
Class Method Details
.adapters ⇒ Object Also known as: list
16 17 18 19 20 |
# File 'lib/codelines/codelines.rb', line 16 def adapters Dir.glob(File.('../adapters/*.rb', __FILE__)).sort { |a, b| b <=> a }.map { |f| f = File.basename(f).split(?.)[0] } end |
.authentication(*args, &block) ⇒ Object
27 28 29 30 |
# File 'lib/codelines/codelines.rb', line 27 def authentication(*args, &block) raise LoadError, 'adapter not found' unless @adapter @adapter.authentication *args, &block end |
.count(*args, &block) ⇒ Object
32 33 34 35 |
# File 'lib/codelines/codelines.rb', line 32 def count(*args, &block) raise LoadError, 'adapter not found' unless @adapter @adapter.count *args, &block end |
.setup(adapter, profile) ⇒ Object
23 24 25 |
# File 'lib/codelines/codelines.rb', line 23 def setup(adapter, profile) @adapter = adapter.new profile end |