Class: HackTree::Config
- Inherits:
-
Object
- Object
- HackTree::Config
- Defined in:
- lib/hack_tree/config.rb
Overview
Configuration object.
Instance Attribute Summary collapse
-
#brief_desc_stub ⇒ Object
If set, substitute missing brief descriptions with this text.
-
#global_name_align ⇒ Object
Aligned width of full names, Range.
-
#group_format ⇒ Object
Mask to format group names (Kernel::sprintf).
-
#hack_format ⇒ Object
Mask to format hack names (Kernel::sprintf).
-
#local_name_align ⇒ Object
Aligned width of (namespaced) names, Range.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(attrs = {}) ⇒ Config
Returns a new instance of Config.
23 24 25 |
# File 'lib/hack_tree/config.rb', line 23 def initialize(attrs = {}) attrs.each {|k, v| send("#{k}=", v)} end |
Instance Attribute Details
#brief_desc_stub ⇒ Object
If set, substitute missing brief descriptions with this text.
5 6 7 |
# File 'lib/hack_tree/config.rb', line 5 def brief_desc_stub @brief_desc_stub end |
#global_name_align ⇒ Object
Aligned width of full names, Range.
global_name_align = 16..32
10 11 12 |
# File 'lib/hack_tree/config.rb', line 10 def global_name_align @global_name_align end |
#group_format ⇒ Object
Mask to format group names (Kernel::sprintf).
13 14 15 |
# File 'lib/hack_tree/config.rb', line 13 def group_format @group_format end |
#hack_format ⇒ Object
Mask to format hack names (Kernel::sprintf).
16 17 18 |
# File 'lib/hack_tree/config.rb', line 16 def hack_format @hack_format end |
#local_name_align ⇒ Object
Aligned width of (namespaced) names, Range.
local_name_align = 16..32
21 22 23 |
# File 'lib/hack_tree/config.rb', line 21 def local_name_align @local_name_align end |