Class: Vuesfc2js::Conversion::ReplacePathAlias
- Inherits:
-
Object
- Object
- Vuesfc2js::Conversion::ReplacePathAlias
- Defined in:
- lib/vuesfc2js/conversion/replace_path_alias.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ String
-
#initialize(str, path_alias = nil) ⇒ ReplacePathAlias
constructor
A new instance of ReplacePathAlias.
Constructor Details
#initialize(str, path_alias = nil) ⇒ ReplacePathAlias
Returns a new instance of ReplacePathAlias.
8 9 10 11 |
# File 'lib/vuesfc2js/conversion/replace_path_alias.rb', line 8 def initialize(str, path_alias = nil) @str = str @path_alias = path_alias end |
Class Method Details
.call(str, path_alias = nil) ⇒ String
16 17 18 19 20 |
# File 'lib/vuesfc2js/conversion/replace_path_alias.rb', line 16 def self.call(str, path_alias = nil) return str if path_alias.nil? || path_alias.empty? new(str, path_alias).call end |
Instance Method Details
#call ⇒ String
23 24 25 |
# File 'lib/vuesfc2js/conversion/replace_path_alias.rb', line 23 def call replace_path_alias(@str, @path_alias) end |