programmable-ventouse 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ventouse/filter_prefix.rb +7 -5
- metadata +4 -3
@@ -1,10 +1,12 @@
|
|
1
1
|
class String
|
2
|
-
def filter_prefix prefix
|
3
|
-
self.starts_with?(prefix) ? self[prefix.to_s.length, self.length] : self
|
4
|
-
end
|
5
|
-
|
6
2
|
def filter_prefix! prefix
|
7
|
-
|
3
|
+
sliced = slice! /^#{prefix}/
|
4
|
+
!sliced.nil?
|
8
5
|
end
|
9
6
|
|
7
|
+
def filter_prefix prefix
|
8
|
+
s = clone
|
9
|
+
s.filter_prefix! prefix
|
10
|
+
s
|
11
|
+
end
|
10
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: programmable-ventouse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilia Ablamonov
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-09-01 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -47,6 +47,7 @@ files:
|
|
47
47
|
- test/declarations_test.rb
|
48
48
|
has_rdoc: true
|
49
49
|
homepage: http://github.com/programmable/ventouse
|
50
|
+
licenses:
|
50
51
|
post_install_message:
|
51
52
|
rdoc_options:
|
52
53
|
- --quiet
|
@@ -70,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
71
|
requirements: []
|
71
72
|
|
72
73
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.
|
74
|
+
rubygems_version: 1.3.5
|
74
75
|
signing_key:
|
75
76
|
specification_version: 2
|
76
77
|
summary: Various usefull ruby/rails shit.
|