Module: RailsAssist::Artifact::View::SingleArg

Defined in:
lib/rails_artifactor/artifact/file_name/view.rb

Defined Under Namespace

Modules: HashArg, HashArgs, StringArg

Class Method Summary collapse

Class Method Details

.get_view_args(*args) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/rails_artifactor/artifact/file_name/view.rb', line 57

def self.get_view_args *args
  args = args.flatten
  arg = args.first
  case arg
  when Hash
    # view_file(:person => :show).should == /views\/person\/show\.html\.erb/
    return HashArg.get_view_args arg if arg.keys.size == 1
    # view_file(:folder => 'person', :type => :show).should == /views\/person\/show\.html\.erb/
    HashArgs.get_view_args *args
  when Symbol, String
    TwoArgs.get_view_args *args
  end
end