Class: Parse::Conf::GitosisStyle
- Inherits:
-
Object
- Object
- Parse::Conf::GitosisStyle
- Defined in:
- lib/parse/conf/gitosis_style.rb
Constant Summary collapse
- Helper =
Parse::Conf::ParserHelper
Instance Attribute Summary collapse
-
#config_raw ⇒ Object
readonly
Returns the value of attribute config_raw.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#empty_group_name ⇒ Object
readonly
Returns the value of attribute empty_group_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config_raw, separator = " ") ⇒ GitosisStyle
constructor
A new instance of GitosisStyle.
- #result ⇒ Object
Constructor Details
#initialize(config_raw, separator = " ") ⇒ GitosisStyle
10 11 12 13 14 15 16 17 |
# File 'lib/parse/conf/gitosis_style.rb', line 10 def initialize(config_raw, separator = " ") @config_raw = config_raw @data = {} @empty_group_name = 'without_group' @separator = separator @data[empty_group_name] = [] end |
Instance Attribute Details
#config_raw ⇒ Object (readonly)
Returns the value of attribute config_raw.
6 7 8 |
# File 'lib/parse/conf/gitosis_style.rb', line 6 def config_raw @config_raw end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/parse/conf/gitosis_style.rb', line 6 def data @data end |
#empty_group_name ⇒ Object (readonly)
Returns the value of attribute empty_group_name.
6 7 8 |
# File 'lib/parse/conf/gitosis_style.rb', line 6 def empty_group_name @empty_group_name end |
Class Method Details
.run(config_raw, separator = " ") ⇒ Object
24 25 26 27 |
# File 'lib/parse/conf/gitosis_style.rb', line 24 def self.run(config_raw, separator = " ") obj = new(config_raw, separator) obj.result end |
Instance Method Details
#result ⇒ Object
19 20 21 22 |
# File 'lib/parse/conf/gitosis_style.rb', line 19 def result parse unless @parsed @data end |