Class: Hubhumans::Humanifier

Inherits:
Object
  • Object
show all
Defined in:
lib/hubhumans.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHumanifier

Returns a new instance of Humanifier.



9
10
11
# File 'lib/hubhumans.rb', line 9

def initialize
  @client = Octokit::Client.new(:auto_traversal => true)
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



7
8
9
# File 'lib/hubhumans.rb', line 7

def client
  @client
end

Instance Method Details

#render_for_org(org_name) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/hubhumans.rb', line 13

def render_for_org(org_name)
  gh_org = @client.organization_members(org_name)
  output = "/* TEAM */\n"
  gh_org.each do |member|
    output << self.render_user(member.)
  end
  output
end

#render_user(login) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/hubhumans.rb', line 22

def render_user()
  user = @client.user()
  output = ""
  output << "  #{format_name(user.name,user.)}\n"
  output << "  Site: #{user.blog}\n" unless user.blog.nil?
  output << "  Location: #{user.location}\n" unless user.location.nil?
  output + "\n"
end