Class: GitReporting::MessageParser
- Inherits:
-
Object
- Object
- GitReporting::MessageParser
- Defined in:
- lib/git_reporting/message_parser.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#regexp ⇒ Object
readonly
Returns the value of attribute regexp.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(input) ⇒ MessageParser
constructor
A new instance of MessageParser.
- #parse ⇒ Object
Constructor Details
#initialize(input) ⇒ MessageParser
Returns a new instance of MessageParser.
11 12 13 14 15 |
# File 'lib/git_reporting/message_parser.rb', line 11 def initialize(input) @input = input.to_s prefix = GitReporting.configuration.prefix @regexp = /\[\s*#{prefix && prefix + "\s*"}\s*(\d[^\[\]]*)\]/m end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
5 6 7 |
# File 'lib/git_reporting/message_parser.rb', line 5 def input @input end |
#regexp ⇒ Object (readonly)
Returns the value of attribute regexp.
5 6 7 |
# File 'lib/git_reporting/message_parser.rb', line 5 def regexp @regexp end |
Class Method Details
.parse(*args) ⇒ Object
7 8 9 |
# File 'lib/git_reporting/message_parser.rb', line 7 def self.parse(*args) new(*args).parse end |
Instance Method Details
#parse ⇒ Object
17 18 19 20 21 |
# File 'lib/git_reporting/message_parser.rb', line 17 def parse = time = parse_time [, time] end |