Class: Kiva::Templates

Inherits:
Object
  • Object
show all
Defined in:
lib/kiva.rb

Overview

Templates which may be used to construct html image tags.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id.



585
586
587
# File 'lib/kiva.rb', line 585

def id
  @id
end

#patternObject

Returns the value of attribute pattern.



586
587
588
# File 'lib/kiva.rb', line 586

def pattern
  @pattern
end

Class Method Details

.loadObject



588
589
590
591
592
# File 'lib/kiva.rb', line 588

def load 
  url = "http://api.kivaws.org/v1/templates/images.json"
  unw = JSON.parse(Kiva.execute(url))
  Kiva._populate self, unw["templates"]
end