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
Returns a new instance of GitosisStyle.
8 9 10 11 12 13 14 15 |
# File 'lib/parse/conf/gitosis_style.rb', line 8 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.
4 5 6 |
# File 'lib/parse/conf/gitosis_style.rb', line 4 def config_raw @config_raw end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/parse/conf/gitosis_style.rb', line 4 def data @data end |
#empty_group_name ⇒ Object (readonly)
Returns the value of attribute empty_group_name.
4 5 6 |
# File 'lib/parse/conf/gitosis_style.rb', line 4 def empty_group_name @empty_group_name end |
Class Method Details
.run(config_raw, separator = " ") ⇒ Object
22 23 24 25 |
# File 'lib/parse/conf/gitosis_style.rb', line 22 def self.run(config_raw, separator = " ") obj = new(config_raw, separator) obj.result end |
Instance Method Details
#result ⇒ Object
17 18 19 20 |
# File 'lib/parse/conf/gitosis_style.rb', line 17 def result parse unless @parsed @data end |