Class: BeginningOpenSource::Issues
- Inherits:
-
Object
- Object
- BeginningOpenSource::Issues
- Defined in:
- lib/beginning_open_source/issues.rb
Constant Summary collapse
- @@all =
[]
- @@starred =
[]
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#html_url ⇒ Object
Returns the value of attribute html_url.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#repo_description ⇒ Object
Returns the value of attribute repo_description.
-
#repo_name ⇒ Object
Returns the value of attribute repo_name.
-
#repo_url ⇒ Object
Returns the value of attribute repo_url.
-
#stars ⇒ Object
Returns the value of attribute stars.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(issues_hash) ⇒ Issues
constructor
A new instance of Issues.
Constructor Details
#initialize(issues_hash) ⇒ Issues
Returns a new instance of Issues.
8 9 10 11 12 13 14 15 16 |
# File 'lib/beginning_open_source/issues.rb', line 8 def initialize(issues_hash) issues_hash.each {|key, value| self.send(("#{key}="), value)} @@all << self unless @stars == nil if @stars > 0 @@starred << self end end end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
2 3 4 |
# File 'lib/beginning_open_source/issues.rb', line 2 def body @body end |
#created_at ⇒ Object
Returns the value of attribute created_at.
2 3 4 |
# File 'lib/beginning_open_source/issues.rb', line 2 def created_at @created_at end |
#html_url ⇒ Object
Returns the value of attribute html_url.
2 3 4 |
# File 'lib/beginning_open_source/issues.rb', line 2 def html_url @html_url end |
#labels ⇒ Object
Returns the value of attribute labels.
2 3 4 |
# File 'lib/beginning_open_source/issues.rb', line 2 def labels @labels end |
#repo_description ⇒ Object
Returns the value of attribute repo_description.
2 3 4 |
# File 'lib/beginning_open_source/issues.rb', line 2 def repo_description @repo_description end |
#repo_name ⇒ Object
Returns the value of attribute repo_name.
2 3 4 |
# File 'lib/beginning_open_source/issues.rb', line 2 def repo_name @repo_name end |
#repo_url ⇒ Object
Returns the value of attribute repo_url.
2 3 4 |
# File 'lib/beginning_open_source/issues.rb', line 2 def repo_url @repo_url end |
#stars ⇒ Object
Returns the value of attribute stars.
2 3 4 |
# File 'lib/beginning_open_source/issues.rb', line 2 def stars @stars end |
#title ⇒ Object
Returns the value of attribute title.
2 3 4 |
# File 'lib/beginning_open_source/issues.rb', line 2 def title @title end |
Class Method Details
.all ⇒ Object
24 25 26 |
# File 'lib/beginning_open_source/issues.rb', line 24 def self.all @@all end |
.create_from_collection(issues_array) ⇒ Object
18 19 20 21 22 |
# File 'lib/beginning_open_source/issues.rb', line 18 def self.create_from_collection(issues_array) issues_array.each do |issue| BeginningOpenSource::Issues.new(issue) end end |
.starred ⇒ Object
28 29 30 |
# File 'lib/beginning_open_source/issues.rb', line 28 def self.starred @@starred end |