Class: Rodot::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/rodot/application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dotfilesObject

Returns the value of attribute dotfiles.



4
5
6
# File 'lib/rodot/application.rb', line 4

def dotfiles
  @dotfiles
end

#nameObject

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

Returns:

  • (Boolean)


11
12
13
# File 'lib/rodot/application.rb', line 11

def invalid?
  @name.nil? || @dotfiles.empty?
end

#to_hashObject



15
16
17
# File 'lib/rodot/application.rb', line 15

def to_hash
  { 'name' => @name, 'dotfiles' => @dotfiles }
end