Class: SpecyDocs::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



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

def initialize
  @capture_path = nil
  @report_path = nil
  @masked_header_keys = []
  @title = 'API Docs'
  @eyebrow = 'specy-docs'
  @opt_in = true
  @capture_paths = []
end

Instance Attribute Details

#capture_pathObject

Returns the value of attribute capture_path.



5
6
7
# File 'lib/specy_docs/configuration.rb', line 5

def capture_path
  @capture_path
end

#capture_pathsObject

Returns the value of attribute capture_paths.



5
6
7
# File 'lib/specy_docs/configuration.rb', line 5

def capture_paths
  @capture_paths
end

#eyebrowObject

Returns the value of attribute eyebrow.



5
6
7
# File 'lib/specy_docs/configuration.rb', line 5

def eyebrow
  @eyebrow
end

#masked_header_keysObject

Returns the value of attribute masked_header_keys.



5
6
7
# File 'lib/specy_docs/configuration.rb', line 5

def masked_header_keys
  @masked_header_keys
end

#opt_inObject

Returns the value of attribute opt_in.



5
6
7
# File 'lib/specy_docs/configuration.rb', line 5

def opt_in
  @opt_in
end

#report_pathObject

Returns the value of attribute report_path.



5
6
7
# File 'lib/specy_docs/configuration.rb', line 5

def report_path
  @report_path
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/specy_docs/configuration.rb', line 5

def title
  @title
end

Instance Method Details

#resolved_capture_pathObject



23
24
25
# File 'lib/specy_docs/configuration.rb', line 23

def resolved_capture_path
  Pathname(capture_path || Rails.root.join('tmp/specy_docs/captures.json'))
end

#resolved_report_pathObject



27
28
29
# File 'lib/specy_docs/configuration.rb', line 27

def resolved_report_path
  Pathname(report_path || Rails.root.join('tmp/specy_docs/report.json'))
end