Sha256: 0d66df0e89f65b700e83822add6526622937d517ae02d884999aef37fb9b2d23

Contents?: true

Size: 717 Bytes

Versions: 3

Compression:

Stored size: 717 Bytes

Contents

module SurveyGizmo; module API
  # @see SurveyGizmo::Resource::ClassMethods
  class Survey
    include SurveyGizmo::Resource
    
    # @macro [attach] virtus_attribute
    #   @return [$2]
    attribute :id,          Integer
    attribute :title,       String    
    attribute :status,      String
    attribute :type,        String,   :default => 'survey'
    attribute :links,       Hash
    attribute :created_on,  DateTime
    
    route '/survey/:id', :via => [:get, :update, :delete]
    route '/survey',     :via => :create
    
    # @macro collection
    collection :pages
        
    # @see SurveyGizmo::Resource#to_param_options    
    def to_param_options
      {:id => self.id}
    end
  end
end; end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
survey-gizmo-ruby-0.7.1 lib/survey_gizmo/api/survey.rb
survey-gizmo-ruby-0.7.0 lib/survey_gizmo/api/survey.rb
survey-gizmo-ruby-0.6.0 lib/survey_gizmo/api/survey.rb