Class: GemDocs::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/gem_docs/config.rb', line 15

def initialize
  # Default: support org comment markers
  @overview_headings = ["Introduction"]
  @headers =
    "      #+PROPERTY: header-args:ruby :results value :colnames no :hlines yes :exports both :dir \"./\"\n      #+PROPERTY: header-args:ruby+ :wrap example :session %n_session :eval yes\n      #+PROPERTY: header-args:ruby+ :prologue \"$:.unshift('./lib') unless $:.first == './lib'; require '%n'\"\n      #+PROPERTY: header-args:ruby+ :ruby \"bundle exec irb\"\n      #+PROPERTY: header-args:sh :exports code :eval no\n      #+PROPERTY: header-args:bash :exports code :eval no\n    HEADER\n  @repo_host = nil\n  @repo_name = nil\n  @repo_user = nil\n  @repo_branch = nil\n  @repo_workflow_dir = \".github/workflows\"\n  @repo_workflow_name = nil\n  @badge =\n    <<~BADGE\n      #+BEGIN_EXPORT markdown\n      [![CI](https://github.com/%u/%n/actions/workflows/%w/badge.svg?branch=%b)](https://github.com/%u/%n/actions/workflows/%w)\n      #+END_EXPORT\n    BADGE\nend\n"

Instance Attribute Details

#badgeObject

Returns the value of attribute badge.



13
14
15
# File 'lib/gem_docs/config.rb', line 13

def badge
  @badge
end

#headersObject

Returns the value of attribute headers.



6
7
8
# File 'lib/gem_docs/config.rb', line 6

def headers
  @headers
end

#overview_headingsObject

Returns the value of attribute overview_headings.



5
6
7
# File 'lib/gem_docs/config.rb', line 5

def overview_headings
  @overview_headings
end

#repo_branchObject

Returns the value of attribute repo_branch.



10
11
12
# File 'lib/gem_docs/config.rb', line 10

def repo_branch
  @repo_branch
end

#repo_hostObject

Returns the value of attribute repo_host.



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

def repo_host
  @repo_host
end

#repo_nameObject

Returns the value of attribute repo_name.



8
9
10
# File 'lib/gem_docs/config.rb', line 8

def repo_name
  @repo_name
end

#repo_userObject

Returns the value of attribute repo_user.



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

def repo_user
  @repo_user
end

#repo_workflow_dirObject

Returns the value of attribute repo_workflow_dir.



11
12
13
# File 'lib/gem_docs/config.rb', line 11

def repo_workflow_dir
  @repo_workflow_dir
end

#repo_workflow_nameObject

Returns the value of attribute repo_workflow_name.



12
13
14
# File 'lib/gem_docs/config.rb', line 12

def repo_workflow_name
  @repo_workflow_name
end