Sha256: edfdf4d003e2fdaa8513c5202c67f2530dd831a85c6663730c177e851a4db596

Contents?: true

Size: 640 Bytes

Versions: 13

Compression:

Stored size: 640 Bytes

Contents

class Scaffold < Thor
  include Thor::Actions
  source_root File.expand_path("../templates", __FILE__)
  def initialize(args=[], options={}, config={})
    super
    self.destination_root= ""
  end

  desc "define_page_md_class", "create domain with class"
  def define_page_md_class
    scaffold_name = "test"
    restful_url = "/#{scaffold_name}.json"
    content = eval( File.read "templates/md_list_class.js" )

    #content = content.gsub "@{scaffold_name}", scaffold_name
    #content = content.gsub "@{restful_url}", "/#{scaffold_name}.json"
    #create_file "public/mobile/js/#{scaffold_name}.js", content
    puts content
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
jt-mobile-kit-1.1.8 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-1.1.7 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-1.1.6 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-1.1.5 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-1.1.2 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-1.1.1 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-1.0.3 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-1.0.2 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-1.0.1 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-1.0.0 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-0.0.4 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-0.0.3 lib/jt-mobile-kit/scaffold/scaffold.thor
jt-mobile-kit-0.0.2 lib/jt-mobile-kit/scaffold/scaffold.thor