cockpit 0.2.4.2 → 0.2.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/cockpit/core/include.rb +4 -0
  2. metadata +4 -4
@@ -23,6 +23,10 @@ module Cockpit
23
23
  define_method "#{key}?" do
24
24
  send(:cockpit).present?(key)
25
25
  end
26
+
27
+ define_method "setting" do |key, scope|
28
+ Cockpit::Settings.for(scope ? scope.to_s.camelize : NilClass)[key]
29
+ end
26
30
  end
27
31
  end
28
32
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cockpit
3
3
  version: !ruby/object:Gem::Version
4
- hash: 75
4
+ hash: 73
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
9
  - 4
10
- - 2
11
- version: 0.2.4.2
10
+ - 3
11
+ version: 0.2.4.3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Lance Pollard
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-05 00:00:00 -05:00
19
+ date: 2010-10-06 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency