Class: Build
- Inherits:
-
Struct
- Object
- Struct
- Build
- Defined in:
- lib/buildboard.rb
Instance Attribute Summary collapse
-
#finished_at ⇒ Object
Returns the value of attribute finished_at.
-
#git ⇒ Object
Returns the value of attribute git.
-
#output ⇒ Object
Returns the value of attribute output.
-
#path ⇒ Object
Returns the value of attribute path.
-
#project ⇒ Object
Returns the value of attribute project.
-
#sha ⇒ Object
Returns the value of attribute sha.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#finished_at ⇒ Object
Returns the value of attribute finished_at
6 7 8 |
# File 'lib/buildboard.rb', line 6 def finished_at @finished_at end |
#git ⇒ Object
Returns the value of attribute git
6 7 8 |
# File 'lib/buildboard.rb', line 6 def git @git end |
#output ⇒ Object
Returns the value of attribute output
6 7 8 |
# File 'lib/buildboard.rb', line 6 def output @output end |
#path ⇒ Object
Returns the value of attribute path
6 7 8 |
# File 'lib/buildboard.rb', line 6 def path @path end |
#project ⇒ Object
Returns the value of attribute project
6 7 8 |
# File 'lib/buildboard.rb', line 6 def project @project end |
#sha ⇒ Object
Returns the value of attribute sha
6 7 8 |
# File 'lib/buildboard.rb', line 6 def sha @sha end |
#started_at ⇒ Object
Returns the value of attribute started_at
6 7 8 |
# File 'lib/buildboard.rb', line 6 def started_at @started_at end |
#status ⇒ Object
Returns the value of attribute status
6 7 8 |
# File 'lib/buildboard.rb', line 6 def status @status end |
Class Method Details
.load_file(filename) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/buildboard.rb', line 8 def load_file(filename) build_data = YAML::load_file(filename) new(build_data['sha'], Time.parse(build_data['started_at']), Time.parse(build_data['finished_at']), build_data['status'], build_data['output'], build_data['project'], filename, build_data['git']) end |
Instance Method Details
#author ⇒ Object
29 30 31 |
# File 'lib/buildboard.rb', line 29 def git.match(/Author: (.*?) \</).to_a[1] end |
#css_class ⇒ Object
21 22 23 |
# File 'lib/buildboard.rb', line 21 def css_class status end |
#file ⇒ Object
25 26 27 |
# File 'lib/buildboard.rb', line 25 def file File.basename(path) end |