Module: ImageVenue

Defined in:
lib/image_venue.rb,
lib/image_venue/cli.rb,
lib/image_venue/file.rb,
lib/image_venue/directory.rb,
lib/image_venue/connection.rb,
lib/image_venue/net_http_get_extensions.rb,
lib/image_venue/net_http_post_extensions.rb

Defined Under Namespace

Modules: NetHttpGetExtensions, NetHttpPostExtensions Classes: Cli, Connection, Directory, File

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.debugObject

Returns the value of attribute debug.



18
19
20
# File 'lib/image_venue.rb', line 18

def debug
  @debug
end

Class Method Details

.base_uriObject



37
38
39
# File 'lib/image_venue.rb', line 37

def base_uri
  @base_uri ||= URI.parse(self.base_url)
end

.base_urlObject



33
34
35
# File 'lib/image_venue.rb', line 33

def base_url
  @base_url ||= 'http://users.imagevenue.com'
end

.debug?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/image_venue.rb', line 20

def debug?
  (self.debug) ? true : false
end

.login(username, password, &block) ⇒ Object



45
46
47
48
49
50
51
# File 'lib/image_venue.rb', line 45

def (username, password, &block)
  connection = ImageVenue::Connection.new(username, password)
  if connection.
    block.call(connection) if block_given?
  end
  return connection
end

.puts_debug(*args) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/image_venue.rb', line 24

def puts_debug(*args)
  if self.debug?
    puts(*args)
    return true
  else
    return false
  end
end

.versionObject



41
42
43
# File 'lib/image_venue.rb', line 41

def version
  @version ||= [0, 1, 0]
end