Class: GitContext::ConfigData
- Inherits:
-
Object
- Object
- GitContext::ConfigData
- Defined in:
- lib/git_context/configuration.rb
Instance Attribute Summary collapse
-
#contexts ⇒ Object
readonly
Returns the value of attribute contexts.
-
#home ⇒ Object
readonly
Returns the value of attribute home.
-
#profiles ⇒ Object
readonly
Returns the value of attribute profiles.
Instance Method Summary collapse
-
#initialize(home) ⇒ ConfigData
constructor
A new instance of ConfigData.
- #serialize ⇒ Object
Constructor Details
#initialize(home) ⇒ ConfigData
Returns a new instance of ConfigData.
9 10 11 12 13 |
# File 'lib/git_context/configuration.rb', line 9 def initialize(home) @home = home @profiles = [] @contexts = [] end |
Instance Attribute Details
#contexts ⇒ Object (readonly)
Returns the value of attribute contexts.
7 8 9 |
# File 'lib/git_context/configuration.rb', line 7 def contexts @contexts end |
#home ⇒ Object (readonly)
Returns the value of attribute home.
7 8 9 |
# File 'lib/git_context/configuration.rb', line 7 def home @home end |
#profiles ⇒ Object (readonly)
Returns the value of attribute profiles.
7 8 9 |
# File 'lib/git_context/configuration.rb', line 7 def profiles @profiles end |
Instance Method Details
#serialize ⇒ Object
15 16 17 18 19 20 |
# File 'lib/git_context/configuration.rb', line 15 def serialize { 'profiles' => profiles.map(&:serialize), 'contexts' => contexts.map(&:serialize) } end |