diff options
Diffstat (limited to 'vendor/gems/ruby-openid-2.1.4/lib/openid/extras.rb')
-rw-r--r-- | vendor/gems/ruby-openid-2.1.4/lib/openid/extras.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/gems/ruby-openid-2.1.4/lib/openid/extras.rb b/vendor/gems/ruby-openid-2.1.4/lib/openid/extras.rb new file mode 100644 index 000000000..0d9560abc --- /dev/null +++ b/vendor/gems/ruby-openid-2.1.4/lib/openid/extras.rb @@ -0,0 +1,11 @@ +class String + def starts_with?(other) + head = self[0, other.length] + head == other + end + + def ends_with?(other) + tail = self[-1 * other.length, other.length] + tail == other + end +end |