Class: Object

Inherits:
BasicObject
Defined in:
lib/riak/core_ext/json.rb,
lib/riak/core_ext/blank.rb,
lib/riak/core_ext/blank.rb,
lib/riak/core_ext/to_param.rb

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) blank?



5
6
7
# File 'lib/riak/core_ext/blank.rb', line 5

def blank?
  false
end

- (Boolean) present?



49
50
51
# File 'lib/riak/core_ext/blank.rb', line 49

def present?
  !blank?
end

- (Object) to_json(*args)



4
5
6
# File 'lib/riak/core_ext/json.rb', line 4

def to_json(*args)
  Riak::JSON.encode(self)
end

- (Object) to_param



3
4
5
# File 'lib/riak/core_ext/to_param.rb', line 3

def to_param
  to_s
end

- (Object) to_query(key)



7
8
9
10
# File 'lib/riak/core_ext/to_param.rb', line 7

def to_query(key)
  require 'cgi' unless defined?(CGI) && defined?(CGI::escape)
  "#{CGI.escape(key.to_s)}=#{CGI.escape(to_param.to_s)}"
end