class AudioVision::Bucket

Attributes

description[RW]
id[RW]
posts[RW]
title[RW]
updated_at[RW]

Public Class Methods

api_namespace() click to toggle source
# File lib/audio_vision/bucket.rb, line 5
def api_namespace
  :buckets
end
new(attributes={}) click to toggle source
# File lib/audio_vision/bucket.rb, line 21
def initialize(attributes={})
  @id           = attributes["id"]
  @title        = attributes["title"]
  @description  = attributes["description"]

  if attributes["updated_at"]
    @updated_at = Time.parse(attributes["updated_at"].to_s)
  end

  @posts = []

  Array(attributes["posts"]).each do |json|
    @posts << AudioVision::Post.new(json)
  end
end