Class: GitHub::User

Inherits:
Mash
  • Object
show all
Defined in:
lib/ruby-github.rb

Instance Method Summary collapse

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 =>  || @user))}
end