Class: Symbol
Instance Method Summary collapse
Instance Method Details
#apricot_call(obj, default = nil) ⇒ Object
172 173 174 175 176 177 178 |
# File 'lib/apricot/ruby_ext.rb', line 172 def apricot_call(obj, default = nil) if obj.is_a?(Hash) || obj.is_a?(Set) obj.apricot_call(self, default) else nil end end |
#apricot_inspect ⇒ Object
162 163 164 165 166 167 168 169 170 |
# File 'lib/apricot/ruby_ext.rb', line 162 def apricot_inspect str = to_s if str =~ /\A#{Apricot::Reader::IDENTIFIER}+\z/ ":#{str}" else ":#{str.inspect}" end end |