Class: Neetob::CLI::Users::Commits

Inherits:
Github::Base show all
Includes:
ActionView::Helpers::DateHelper
Defined in:
lib/neetob/cli/users/commits.rb

Constant Summary

Constants inherited from Base

Base::NEETO_APPS_LIST_LINK

Instance Attribute Summary collapse

Attributes inherited from Github::Base

#client

Attributes inherited from Base

#ui

Instance Method Summary collapse

Methods included from Utils

#camel_case_to_slug, #is_upper?, #symbolize_keys

Constructor Details

#initialize(author, duration, apps = ["*"], sandbox = false) ⇒ Commits

Returns a new instance of Commits.



16
17
18
19
20
21
22
# File 'lib/neetob/cli/users/commits.rb', line 16

def initialize(author, duration, apps = ["*"], sandbox = false)
  super()
  @sandbox = sandbox
  @apps = apps
  @author = author
  @duration = duration
end

Instance Attribute Details

#appsObject

Returns the value of attribute apps.



14
15
16
# File 'lib/neetob/cli/users/commits.rb', line 14

def apps
  @apps
end

#authorObject

Returns the value of attribute author.



14
15
16
# File 'lib/neetob/cli/users/commits.rb', line 14

def author
  @author
end

#durationObject

Returns the value of attribute duration.



14
15
16
# File 'lib/neetob/cli/users/commits.rb', line 14

def duration
  @duration
end

#sandboxObject

Returns the value of attribute sandbox.



14
15
16
# File 'lib/neetob/cli/users/commits.rb', line 14

def sandbox
  @sandbox
end

Instance Method Details

#runObject



24
25
26
27
28
29
# File 'lib/neetob/cli/users/commits.rb', line 24

def run
  table_rows = build_commit_rows
  html_content = build_html_content(table_rows)
  create_html_file(html_content)
  open_html_file_in_default_system_application
end