Class: GitTrend::Project
- Inherits:
-
Object
- Object
- GitTrend::Project
- Defined in:
- lib/git_trend/project.rb
Instance Attribute Summary collapse
-
#all_star_count ⇒ Object
Returns the value of attribute all_star_count.
-
#description ⇒ Object
Returns the value of attribute description.
-
#fork_count ⇒ Object
Returns the value of attribute fork_count.
-
#lang ⇒ Object
Returns the value of attribute lang.
-
#name ⇒ Object
Returns the value of attribute name.
-
#star_count ⇒ Object
Returns the value of attribute star_count.
Instance Method Summary collapse
-
#initialize(name: "", description: "", lang: "", all_star_count: 0, fork_count: 0, star_count: 0) ⇒ Project
constructor
A new instance of Project.
- #to_a ⇒ Object
Constructor Details
#initialize(name: "", description: "", lang: "", all_star_count: 0, fork_count: 0, star_count: 0) ⇒ Project
Returns a new instance of Project.
5 6 7 8 9 10 11 12 |
# File 'lib/git_trend/project.rb', line 5 def initialize(name: "", description: "", lang: "", all_star_count: 0, fork_count: 0, star_count: 0) self.name = name self.description = description self.lang = lang self.all_star_count = all_star_count self.fork_count = fork_count self.star_count = star_count end |
Instance Attribute Details
#all_star_count ⇒ Object
Returns the value of attribute all_star_count.
3 4 5 |
# File 'lib/git_trend/project.rb', line 3 def all_star_count @all_star_count end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/git_trend/project.rb', line 3 def description @description end |
#fork_count ⇒ Object
Returns the value of attribute fork_count.
3 4 5 |
# File 'lib/git_trend/project.rb', line 3 def fork_count @fork_count end |
#lang ⇒ Object
Returns the value of attribute lang.
3 4 5 |
# File 'lib/git_trend/project.rb', line 3 def lang @lang end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/git_trend/project.rb', line 3 def name @name end |
#star_count ⇒ Object
Returns the value of attribute star_count.
3 4 5 |
# File 'lib/git_trend/project.rb', line 3 def star_count @star_count end |
Instance Method Details
#to_a ⇒ Object
14 15 16 |
# File 'lib/git_trend/project.rb', line 14 def to_a [@name, @lang, @star_count.to_s] end |