Module: RailsAssist::Artifact::Asset::TwoArgs::TwoLabels

Extended by:
FileName::Helper
Defined in:
lib/rails_artifactor/artifact/file_name/asset.rb

Class Method Summary collapse

Methods included from FileName::Helper

filename_name, filename_type, get_asset_type, get_type, type_from

Class Method Details

.get_asset_args(*args) ⇒ Object

asset_file(:person, :show, :type => ‘js’).should == /assets/person/show.js/



146
147
148
149
150
151
152
153
# File 'lib/rails_artifactor/artifact/file_name/asset.rb', line 146

def self.get_asset_args *args
  args = args.flatten
  folder = args.first.to_s
  action = args[1].to_s
  hash = args[2] if args.size > 2
  type = get_asset_type(hash[:type] || folder)
  [folder, action, type]
end