Class: ChangelogGenerator::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/changelog_generator/issue.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#numberObject

Returns the value of attribute number.



4
5
6
# File 'lib/changelog_generator/issue.rb', line 4

def number
  @number
end

#titleObject

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