RubyApp 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.0.11)
4
+ RubyApp (0.0.12)
5
5
  BlueCloth
6
6
  chronic_duration
7
7
  facets
@@ -3,7 +3,7 @@
3
3
  %ul.select{attributes}
4
4
  - is_even = true
5
5
  - self.items.each_with_index do |item, index|
6
- - unless index == self.selected_index
6
+ - unless item == self.selected_item
7
7
  %li.item{:class => is_even ? 'even' : 'odd'}
8
8
  %a.item{:href => '', :index => index}
9
9
  = yield(:item, item, index) || item
@@ -11,26 +11,19 @@ module RubyApp
11
11
 
12
12
  exclude_parent_template(:html, :css, :js)
13
13
 
14
- attr_accessor :selected_index, :selected_item
14
+ attr_accessor :selected_item
15
15
 
16
16
  def initialize
17
17
  super
18
18
  end
19
19
 
20
- def selected_index=(index)
21
- @selected_index = index
22
- @selected_item = @items[index]
23
- end
24
-
25
20
  def selected_item=(item)
26
- @selected_index = @items.index(item)
27
- @selected_item = @selected_index ? @items[@selected_index] : nil
21
+ @selected_item = item
28
22
  end
29
23
 
30
24
  protected
31
25
 
32
26
  def on_clicked(event)
33
- @selected_index = event.index
34
27
  @selected_item = event.item
35
28
  event.update_element(self)
36
29
  super(event)
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RubyApp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 11
10
- version: 0.0.11
9
+ - 12
10
+ version: 0.0.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frank G. Ficnar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-20 00:00:00 Z
18
+ date: 2011-11-21 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement