Class: Mj::AlternativeFile::Resolvers::Ruby::RailsResolver

Inherits:
Base
  • Object
show all
Defined in:
lib/mj/alternative_file/resolvers/ruby/rails_resolver.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#resolve

Constructor Details

#initialize(root: nil) ⇒ RailsResolver

Returns a new instance of RailsResolver.



10
11
12
13
14
15
16
# File 'lib/mj/alternative_file/resolvers/ruby/rails_resolver.rb', line 10

def initialize(root: nil)
  if root
    root = "#{root.chomp("/")}/"
  end

  @root = root
end

Instance Attribute Details

#rootObject (readonly)

Returns the value of attribute root.



8
9
10
# File 'lib/mj/alternative_file/resolvers/ruby/rails_resolver.rb', line 8

def root
  @root
end