Class: GitHub::User
- Inherits:
-
Mash
- Object
- Mash
- GitHub::User
- Defined in:
- lib/ruby-github.rb
Instance Method Summary collapse
-
#initialize(hash = nil) ⇒ User
constructor
A new instance of User.
- #repositories=(repo_array) ⇒ Object
Constructor Details
#initialize(hash = nil) ⇒ User
Returns a new instance of User.
42 43 44 45 |
# File 'lib/ruby-github.rb', line 42 def initialize(hash = nil) @user = hash["login"] if hash super end |
Instance Method Details
#repositories=(repo_array) ⇒ Object
47 48 49 |
# File 'lib/ruby-github.rb', line 47 def repositories=(repo_array) self["repositories"] = repo_array.collect{|r| ::GitHub::Repository.new(r.merge(:user => login || @user))} end |