Module: Velocify

Defined in:
lib/velocify.rb,
lib/velocify/lead.rb,
lib/velocify/agent.rb,
lib/velocify/field.rb,
lib/velocify/model.rb,
lib/velocify/report.rb,
lib/velocify/status.rb,
lib/velocify/payload.rb,
lib/velocify/version.rb,
lib/velocify/campaign.rb,
lib/velocify/field_type.rb,
lib/velocify/response_reader.rb

Defined Under Namespace

Modules: Model Classes: AddLeadsPayload, Agent, Campaign, Config, Field, FieldType, GetReportResultsPayload, Lead, MessagePayload, Report, ResponseReader, Status

Constant Summary collapse

VERSION =
"0.1.7"

Class Method Summary collapse

Class Method Details

.configConfig

Returns the global config object.

Returns:

  • (Config)

    the global config object



13
14
15
16
17
18
# File 'lib/velocify.rb', line 13

def config
  @config ||= Config.new.tap do |config|
    config.username = ENV['VELOCIFY_USERNAME']
    config.password = ENV['VELOCIFY_PASSWORD']
  end
end

.configure {|config| ... } ⇒ Object

Programmatically configure your connection to Velocify

Yields:

  • (config)

    the block that contains the Config object



23
24
25
# File 'lib/velocify.rb', line 23

def configure &blk
  blk.call config
end