class GhIssues::Issue
I hold info of an issue and perform output format. @todo Separate info and formatter in 2 classes.
Public Class Methods
new(hash)
click to toggle source
# File lib/gh-issues/issue.rb, line 8 def initialize hash self.merge!(hash) end
Public Instance Methods
to_string()
click to toggle source
# File lib/gh-issues/issue.rb, line 16 def to_string "#{to_title_and_labels}\n#{self[:body].color(:blue)}" end
to_title_and_labels()
click to toggle source
# File lib/gh-issues/issue.rb, line 12 def to_title_and_labels "#{format_id} #{self[:title].color(:green)} #{self[:labels].join(', ')}" end
Private Instance Methods
format_id()
click to toggle source
# File lib/gh-issues/issue.rb, line 22 def format_id format("%3d", self[:number]) end