Class: Tomo::Paths

Inherits:
Object
  • Object
show all
Defined in:
lib/tomo/paths.rb

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ Paths

Returns a new instance of Paths.



5
6
7
8
# File 'lib/tomo/paths.rb', line 5

def initialize(settings)
  @settings = settings
  freeze
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object (private)

Raises:

  • (ArgumentError)


18
19
20
21
22
23
# File 'lib/tomo/paths.rb', line 18

def method_missing(method, *args)
  return super unless setting?(method)
  raise ArgumentError, "#{method} takes no arguments" unless args.empty?

  path(:"#{method}_path")
end

Instance Method Details

#deploy_toObject



10
11
12
# File 'lib/tomo/paths.rb', line 10

def deploy_to
  path(:deploy_to)
end