Class: ChangelogGenerator::Issue
- Inherits:
-
Object
- Object
- ChangelogGenerator::Issue
- Defined in:
- lib/changelog_generator/issue.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
Returns the value of attribute number.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Issue
constructor
A new instance of Issue.
Constructor Details
#initialize(args) ⇒ Issue
Returns a new instance of Issue.
13 14 15 16 17 |
# File 'lib/changelog_generator/issue.rb', line 13 def initialize(args) args.each do |k,v| instance_variable_set("@#{k}", v) unless v.nil? end end |
Instance Attribute Details
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/changelog_generator/issue.rb', line 4 def number @number end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/changelog_generator/issue.rb', line 3 def title @title end |
Class Method Details
.from_github_issue(github_issue) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/changelog_generator/issue.rb', line 6 def self.from_github_issue(github_issue) self.new({ title: github_issue['title'], number: github_issue['number'] }) end |