Class: JasperClient::Resource
- Inherits:
-
Object
- Object
- JasperClient::Resource
- Defined in:
- lib/jasper-client/jasper_client.rb
Overview
a Jasper Server resource.
A Jasperserver resource is a generic concept used to represent almost anything in a jasper server. It can be a file, an image, pre-run report output, a query, a report control, etc. We attempt to boil down the resource to something relatively consumable by application developers.
Instance Attribute Summary collapse
-
#creation_date ⇒ Object
readonly
Returns the value of attribute creation_date.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#uri_string ⇒ Object
readonly
Returns the value of attribute uri_string.
Instance Method Summary collapse
-
#initialize(soap) ⇒ Resource
constructor
Take a Nokogiri::XML object of a.
Constructor Details
#initialize(soap) ⇒ Resource
Take a Nokogiri::XML object of a
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/jasper-client/jasper_client.rb', line 13 def initialize(soap) return unless soap.respond_to?(:search) @name = soap['name'] @type = soap['wsType'] @uri_string = soap['uriString'] @label = soap.search('./label/node()').inner_text @description = soap.search('./description/node()').inner_text @createion_date = soap.search('./creation_date/node()').inner_text initialize_properties soap.search('./resourceProperty') initialize_resources soap.search('./resourceDescriptor') end |
Instance Attribute Details
#creation_date ⇒ Object (readonly)
Returns the value of attribute creation_date.
10 11 12 |
# File 'lib/jasper-client/jasper_client.rb', line 10 def creation_date @creation_date end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
10 11 12 |
# File 'lib/jasper-client/jasper_client.rb', line 10 def description @description end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
10 11 12 |
# File 'lib/jasper-client/jasper_client.rb', line 10 def label @label end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/jasper-client/jasper_client.rb', line 10 def name @name end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
10 11 12 |
# File 'lib/jasper-client/jasper_client.rb', line 10 def properties @properties end |
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
10 11 12 |
# File 'lib/jasper-client/jasper_client.rb', line 10 def resources @resources end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
10 11 12 |
# File 'lib/jasper-client/jasper_client.rb', line 10 def type @type end |
#uri_string ⇒ Object (readonly)
Returns the value of attribute uri_string.
10 11 12 |
# File 'lib/jasper-client/jasper_client.rb', line 10 def uri_string @uri_string end |