Class: Ptimelog::Script
- Inherits:
-
Object
- Object
- Ptimelog::Script
- Defined in:
- lib/ptimelog/script.rb
Overview
Wrapper around all external scripts that might be called to get more information about the time-entries
Instance Method Summary collapse
- #billable ⇒ Object
-
#initialize(config_dir) ⇒ Script
constructor
A new instance of Script.
- #parser(parser_name) ⇒ Object
Constructor Details
#initialize(config_dir) ⇒ Script
Returns a new instance of Script.
7 8 9 |
# File 'lib/ptimelog/script.rb', line 7 def initialize(config_dir) @config_dir = config_dir end |
Instance Method Details
#billable ⇒ Object
16 17 18 |
# File 'lib/ptimelog/script.rb', line 16 def billable @config_dir.join('billable'). end |
#parser(parser_name) ⇒ Object
11 12 13 14 |
# File 'lib/ptimelog/script.rb', line 11 def parser(parser_name) @config_dir.join("parsers/#{parser_name}") # FIXME: security-hole, prevent relative paths! . end |