Class: Fluxiom::Tags

Inherits:
Fluxiom show all
Includes:
Enumerable
Defined in:
lib/fluxapi/tags.rb

Instance Attribute Summary

Attributes inherited from Fluxiom

#base_url

Instance Method Summary collapse

Methods inherited from Fluxiom

#account, #assets, call, post_call, #tags, #users

Constructor Details

#initializeTags

Returns a new instance of Tags.



3
4
5
6
7
8
# File 'lib/fluxapi/tags.rb', line 3

def initialize
  @tags = []
  self.class.call('/api/tags.xml')['tags'].each do |v|
    @tags << Fluxiom::Tag.new(v)
  end
end

Instance Method Details

#eachObject



9
10
11
# File 'lib/fluxapi/tags.rb', line 9

def each
  @tags.each {|pt| yield pt} 
end

#firstObject



12
13
14
# File 'lib/fluxapi/tags.rb', line 12

def first
  @tags.first
end