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.



39
40
41
42
# File 'lib/ruby-github.rb', line 39

def initialize(hash = nil)
  @user = hash["login"] if hash
  super
end

Instance Method Details

#repositories=(repo_array) ⇒ Object



44
45
46
47
# File 'lib/ruby-github.rb', line 44

def repositories=(repo_array)
  puts self.inspect
  self["repositories"] = repo_array.collect{|r| ::GitHub::Repository.new(r.merge(:user =>  || @user))}
end