Giter VIP home page Giter VIP logo

Comments (6)

hoopsho avatar hoopsho commented on July 30, 2024

I was able to get it to work in a ruby script using the following as a starting point:

#!/usr/bin/ruby
require 'rubygems'
require 'active_support/core_ext/class/subclasses'
require 'closeio'
Closeio.configure("<API_KEY>")
lead = Closeio::Lead.find('<LEAD_ID>')
puts lead.name

I also used bundler with the following Gemfile:
source 'https://rubygems.org'

gem 'closeio'
gem 'activesupport'

Again, just a starting point that might help you.

from closeio.

danmelnick avatar danmelnick commented on July 30, 2024

Hi @hoopsho — right, I was able to do the same. I'm just pointing out that if it's a dependency it should be made explicit.

from closeio.

taylorbrooks avatar taylorbrooks commented on July 30, 2024

@hoopsho @danmelnick Good point.

Do either of you have a preference on removing the dependency on activesupport or moving this inline like?

def self.descendants
  ObjectSpace.each_object(Class).select { |klass| klass < self }
end

from closeio.

danmelnick avatar danmelnick commented on July 30, 2024

I'd prefer to remove the dependency, so I'd vote for pure Ruby.

from closeio.

taylorbrooks avatar taylorbrooks commented on July 30, 2024

I feel like I'm taking crazy pills...

I pushed this 2d30815, which should fix it, but I'm getting this error:

undefined method `descendants' for Closeio::Base:Class (NoMethodError)

What am I missing that's obvious?

from closeio.

taylorbrooks avatar taylorbrooks commented on July 30, 2024

Releasing a new version of the gem that makes this moot.

from closeio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.