Class: Elasticrepo::RepoSubset
- Inherits:
-
Object
- Object
- Elasticrepo::RepoSubset
- Defined in:
- lib/elasticrepo/repo_subset.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#pushed_at ⇒ Object
readonly
Returns the value of attribute pushed_at.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ RepoSubset
constructor
A new instance of RepoSubset.
- #to_indexed_json ⇒ Object
Constructor Details
#initialize(attributes) ⇒ RepoSubset
Returns a new instance of RepoSubset.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/elasticrepo/repo_subset.rb', line 5 def initialize(attributes) @id = attributes["id"] @owner = attributes["owner"]["login"] @name = attributes["name"] @url = attributes["url"] @description = attributes["description"] @created_at = attributes["created_at"] @pushed_at = attributes["pushed_at"] @organization = attributes["owner"]["type"] @full_name = attributes["full_name"] @language = attributes["language"] @updated_at = attributes["updated_at"] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def created_at @created_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def description @description end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def full_name @full_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def id @id end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def language @language end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def name @name end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def organization @organization end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def owner @owner end |
#pushed_at ⇒ Object (readonly)
Returns the value of attribute pushed_at.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def pushed_at @pushed_at end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def updated_at @updated_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/elasticrepo/repo_subset.rb', line 3 def url @url end |
Instance Method Details
#to_indexed_json ⇒ Object
19 20 21 |
# File 'lib/elasticrepo/repo_subset.rb', line 19 def to_indexed_json self.to_json end |