Class: GitHub::User

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

Instance Method Summary (collapse)

Constructor Details

- (User) initialize(hash = nil)

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

- (Object) repositories=(repo_array)



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