Class: GithubSnapshot::Organization
- Inherits:
-
Object
- Object
- GithubSnapshot::Organization
- Defined in:
- lib/github_snapshot/organization.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#repos ⇒ Object
readonly
Returns the value of attribute repos.
Instance Method Summary collapse
- #backup ⇒ Object
-
#initialize(name, repos) ⇒ Organization
constructor
A new instance of Organization.
Constructor Details
#initialize(name, repos) ⇒ Organization
Returns a new instance of Organization.
9 10 11 12 |
# File 'lib/github_snapshot/organization.rb', line 9 def initialize(name, repos) @name = name @repos = repos end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/github_snapshot/organization.rb', line 7 def name @name end |
#repos ⇒ Object (readonly)
Returns the value of attribute repos.
7 8 9 |
# File 'lib/github_snapshot/organization.rb', line 7 def repos @repos end |
Instance Method Details
#backup ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/github_snapshot/organization.rb', line 14 def backup repos.to_a.each do |repo| GithubSnapshot.exec "mkdir -p #{name}" repository = Repository.new repo, self repository.backup end end |