Module: Sfp::Helper

Defined in:
lib/nuri/master.rb,
lib/nuri/helper.rb

Constant Summary collapse

Sfp2Ruby =
Object.new

Class Method Summary collapse

Class Method Details

.sfp_to_s(v) ⇒ Object



733
734
735
736
737
738
739
740
741
742
# File 'lib/nuri/master.rb', line 733

def self.sfp_to_s(v)
	if v.is_a?(Hash)
		return "null" if v['_context'] == 'null'
		return v['_values'].inspect if v['_context'] == 'set'
		return "<hash>"
	elsif v.is_a?(String) and v =~ /^\$\./
		return v
	end
	v.inspect
end