class Wallaby::PrefixesBuilder
To extend prefixes to provide more possibility
Attributes
prefixes[RW]
resources_name[RW]
script_name[RW]
Public Instance Methods
execute()
click to toggle source
# File lib/services/wallaby/prefixes_builder.rb, line 12 def execute return if prefixes.include? resources_path full_prefix = [script_path, resources_path].compact.join(SLASH) return if prefixes.include? full_prefix prefixes.insert 0, full_prefix end
Private Instance Methods
resources_path()
click to toggle source
# File lib/services/wallaby/prefixes_builder.rb, line 24 def resources_path @resources_path ||= resources_name.try :gsub, COLONS, SLASH end
script_path()
click to toggle source
# File lib/services/wallaby/prefixes_builder.rb, line 28 def script_path @script_path ||= script_name.try :[], 1..-1 end