Sha256: 8531e27291a1ec1f8cfbead52fc1788e61750d883c74a14ff8830b51d42570e1

Contents?: true

Size: 338 Bytes

Versions: 7

Compression:

Stored size: 338 Bytes

Contents

module WoopraRails::Response
  class << self
    attr_accessor :success
    def new(json=nil)
      if json
        JSON.parse(json).each do |k,v|
          self.send("#{k}=".to_sym, v)
        end
      end
      self
    end

    def success?
      return true if self.send(:success) == 1 || @dryrun
      return false
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
woopra_rails-1.0.6 lib/woopra_rails/response.rb
woopra_rails-1.0.5 lib/woopra_rails/response.rb
woopra_rails-1.0.4 lib/woopra_rails/response.rb
woopra_rails-1.0.3 lib/woopra_rails/response.rb
woopra_rails-1.0.2 lib/woopra_rails/response.rb
woopra_rails-1.0.1 lib/woopra_rails/response.rb
woopra_rails-1.0 lib/woopra_rails/response.rb