Class: Allorails::Website

Inherits:
Base show all
Defined in:
lib/allorails/response/model.rb

Overview

Class providing object mapping of a website item

Instance Attribute Summary

Attributes inherited from Response::ApiMappingResponse

#xml

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods inherited from Response::ApiMappingResponse

#_verify, attribute_reader, #initialize, node_reader

Methods inherited from Response::ApiResponse

#_verify, #initialize

Constructor Details

This class inherits a constructor from Allorails::Base

Instance Method Details

#audience_restricted?Boolean

Checks wether the website’s audience is restricted

@return (boolean) wether the website's audience is restricted

Returns:

  • (Boolean)


32
33
34
# File 'lib/allorails/response/model.rb', line 32

def audience_restricted?
  xml.attribute('audience_restricted') == 'true'
end

#categoryObject

Provides the website category

@return (string) website category


38
# File 'lib/allorails/response/model.rb', line 38

attribute_reader :category

#idObject

Provides the website id

@return (int) website id


20
# File 'lib/allorails/response/model.rb', line 20

attribute_reader :id, Integer

#nameObject

Provides the website name

@return (string) website name


24
# File 'lib/allorails/response/model.rb', line 24

attribute_reader :name

#urlObject

Provides the website url

@return (string) website url


28
# File 'lib/allorails/response/model.rb', line 28

attribute_reader :url