Class: Auphonic::Base

Inherits:
Struct
  • Object
show all
Defined in:
lib/auphonic/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



2
3
4
# File 'lib/auphonic/base.rb', line 2

def data
  @data
end

Class Method Details

.allObject



5
6
7
8
9
# File 'lib/auphonic/base.rb', line 5

def all
  method = self.name.downcase.gsub('::', '_').sub('auphonic_', '') + 's'
  raise 'Please do not call base directly' if method == 'bases'
  Endpoint.instance.send(method).map { |data| new(data) }
end

Instance Method Details

#uuidObject



12
13
14
# File 'lib/auphonic/base.rb', line 12

def uuid
  data['uuid']
end