Class: ConfluenceSoap::Page

Inherits:
Struct
  • Object
show all
Defined in:
lib/confluence-soap.rb

Constant Summary collapse

SKIPPED_KEYS =
[:content_status, :created, :creator, :current, :home_page, :modified, :modifier, :url]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



6
7
8
# File 'lib/confluence-soap.rb', line 6

def content
  @content
end

#content_statusObject

Returns the value of attribute content_status

Returns:

  • (Object)

    the current value of content_status



6
7
8
# File 'lib/confluence-soap.rb', line 6

def content_status
  @content_status
end

#createdObject

Returns the value of attribute created

Returns:

  • (Object)

    the current value of created



6
7
8
# File 'lib/confluence-soap.rb', line 6

def created
  @created
end

#creatorObject

Returns the value of attribute creator

Returns:

  • (Object)

    the current value of creator



6
7
8
# File 'lib/confluence-soap.rb', line 6

def creator
  @creator
end

#currentObject

Returns the value of attribute current

Returns:

  • (Object)

    the current value of current



6
7
8
# File 'lib/confluence-soap.rb', line 6

def current
  @current
end

#home_pageObject

Returns the value of attribute home_page

Returns:

  • (Object)

    the current value of home_page



6
7
8
# File 'lib/confluence-soap.rb', line 6

def home_page
  @home_page
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



6
7
8
# File 'lib/confluence-soap.rb', line 6

def id
  @id
end

#modifiedObject

Returns the value of attribute modified

Returns:

  • (Object)

    the current value of modified



6
7
8
# File 'lib/confluence-soap.rb', line 6

def modified
  @modified
end

#modifierObject

Returns the value of attribute modifier

Returns:

  • (Object)

    the current value of modifier



6
7
8
# File 'lib/confluence-soap.rb', line 6

def modifier
  @modifier
end

#parent_idObject

Returns the value of attribute parent_id

Returns:

  • (Object)

    the current value of parent_id



6
7
8
# File 'lib/confluence-soap.rb', line 6

def parent_id
  @parent_id
end

#permissionsObject

Returns the value of attribute permissions

Returns:

  • (Object)

    the current value of permissions



6
7
8
# File 'lib/confluence-soap.rb', line 6

def permissions
  @permissions
end

#spaceObject

Returns the value of attribute space

Returns:

  • (Object)

    the current value of space



6
7
8
# File 'lib/confluence-soap.rb', line 6

def space
  @space
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



6
7
8
# File 'lib/confluence-soap.rb', line 6

def title
  @title
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



6
7
8
# File 'lib/confluence-soap.rb', line 6

def url
  @url
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



6
7
8
# File 'lib/confluence-soap.rb', line 6

def version
  @version
end

Class Method Details

.from_hash(h) ⇒ Object



8
9
10
11
# File 'lib/confluence-soap.rb', line 8

def self.from_hash h
  values = h.values_at(*Page.members.map {|m|m.to_sym}).map {|v| v.is_a?(Hash) ? v[:value]||'' : v}
  self.new *values
end

Instance Method Details

#to_soapObject



14
15
16
# File 'lib/confluence-soap.rb', line 14

def to_soap
  to_h.reject {|k,v| v.nil? || SKIPPED_KEYS.include?(k)}
end