Class: Elasticrepo::RepoSubset

Inherits:
Object
  • Object
show all
Defined in:
lib/elasticrepo/repo_subset.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_atObject (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

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/elasticrepo/repo_subset.rb', line 3

def description
  @description
end

#full_nameObject (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

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/elasticrepo/repo_subset.rb', line 3

def id
  @id
end

#languageObject (readonly)

Returns the value of attribute language.



3
4
5
# File 'lib/elasticrepo/repo_subset.rb', line 3

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/elasticrepo/repo_subset.rb', line 3

def name
  @name
end

#organizationObject (readonly)

Returns the value of attribute organization.



3
4
5
# File 'lib/elasticrepo/repo_subset.rb', line 3

def organization
  @organization
end

#ownerObject (readonly)

Returns the value of attribute owner.



3
4
5
# File 'lib/elasticrepo/repo_subset.rb', line 3

def owner
  @owner
end

#pushed_atObject (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_atObject (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

#urlObject (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_jsonObject



19
20
21
# File 'lib/elasticrepo/repo_subset.rb', line 19

def to_indexed_json
  self.to_json
end