Class: AocCli::Location

Inherits:
Kangaru::Model
  • Object
show all
Defined in:
lib/aoc_cli/models/location.rb

Instance Method Summary collapse

Instance Method Details

#event_dir?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/aoc_cli/models/location.rb', line 12

def event_dir?
  resource.is_a?(Event)
end

#exists?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/aoc_cli/models/location.rb', line 8

def exists?
  File.exist?(path)
end

#puzzle_dir?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/aoc_cli/models/location.rb', line 16

def puzzle_dir?
  resource.is_a?(Puzzle)
end

#to_pathnameObject



20
21
22
# File 'lib/aoc_cli/models/location.rb', line 20

def to_pathname
  Pathname.new(path)
end