Class: Rodot::Application
- Inherits:
-
Object
- Object
- Rodot::Application
- Defined in:
- lib/rodot/application.rb
Instance Attribute Summary collapse
-
#dotfiles ⇒ Object
Returns the value of attribute dotfiles.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name = nil, dotfiles = []) ⇒ Application
constructor
A new instance of Application.
- #invalid? ⇒ Boolean
- #to_hash ⇒ Object
Constructor Details
#initialize(name = nil, dotfiles = []) ⇒ Application
Returns a new instance of Application.
6 7 8 9 |
# File 'lib/rodot/application.rb', line 6 def initialize(name = nil, dotfiles = []) @name = name @dotfiles = dotfiles end |
Instance Attribute Details
#dotfiles ⇒ Object
Returns the value of attribute dotfiles.
4 5 6 |
# File 'lib/rodot/application.rb', line 4 def dotfiles @dotfiles end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rodot/application.rb', line 3 def name @name end |
Instance Method Details
#invalid? ⇒ Boolean
11 12 13 |
# File 'lib/rodot/application.rb', line 11 def invalid? @name.nil? || @dotfiles.empty? end |
#to_hash ⇒ Object
15 16 17 |
# File 'lib/rodot/application.rb', line 15 def to_hash { 'name' => @name, 'dotfiles' => @dotfiles } end |