moode-haml-jqm 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,10 @@
1
+
2
+ def load_component_template(component_name)
3
+ template_path = File.expand_path('../', __FILE__)
4
+ file_name = "_#{component_name}.haml"
5
+ file_relative_path = "component/#{file_name}"
6
+ if File.exist? file_relative_path
7
+ return File.read(file_relative_path)
8
+ end
9
+ return File.read("#{template_path}/#{file_name}")
10
+ end
@@ -1,7 +1,7 @@
1
1
  module Moode
2
2
  module Haml
3
3
  module Jqm
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
@@ -1,11 +1,8 @@
1
1
  require "moode-haml-jqm/version"
2
+ require "moode-haml-jqm/load_template"
2
3
 
3
4
  require 'haml'
4
5
 
5
- def load_component_template(component_name)
6
- template_path = File.expand_path('../', __FILE__)
7
- return File.read("#{template_path}/moode-haml-jqm/_#{component_name}.haml")
8
- end
9
6
 
10
7
  def link_button(args)
11
8
  template = load_component_template(:link_button)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moode-haml-jqm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-08 00:00:00.000000000 Z
12
+ date: 2012-11-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: jquery mobile based haml component
15
15
  email:
@@ -30,6 +30,7 @@ files:
30
30
  - lib/moode-haml-jqm/_input_hidden.haml
31
31
  - lib/moode-haml-jqm/_link_button.haml
32
32
  - lib/moode-haml-jqm/_nav_bar.haml
33
+ - lib/moode-haml-jqm/load_template.rb
33
34
  - lib/moode-haml-jqm/version.rb
34
35
  - moode-haml-jqm.gemspec
35
36
  homepage: https://github.com/jtong/moode-haml-jqm