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



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

def content
  @content
end

#content_statusObject

Returns the value of attribute content_status

Returns:

  • (Object)

    the current value of content_status



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

def content_status
  @content_status
end

#createdObject

Returns the value of attribute created

Returns:

  • (Object)

    the current value of created



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

def created
  @created
end

#creatorObject

Returns the value of attribute creator

Returns:

  • (Object)

    the current value of creator



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

def creator
  @creator
end

#currentObject

Returns the value of attribute current

Returns:

  • (Object)

    the current value of current



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

def current
  @current
end

#home_pageObject

Returns the value of attribute home_page

Returns:

  • (Object)

    the current value of home_page



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

def home_page
  @home_page
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



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

def id
  @id
end

#modifiedObject

Returns the value of attribute modified

Returns:

  • (Object)

    the current value of modified



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

def modified
  @modified
end

#modifierObject

Returns the value of attribute modifier

Returns:

  • (Object)

    the current value of modifier



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

def modifier
  @modifier
end

#parent_idObject

Returns the value of attribute parent_id

Returns:

  • (Object)

    the current value of parent_id



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

def parent_id
  @parent_id
end

#permissionsObject

Returns the value of attribute permissions

Returns:

  • (Object)

    the current value of permissions



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

def permissions
  @permissions
end

#spaceObject

Returns the value of attribute space

Returns:

  • (Object)

    the current value of space



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

def space
  @space
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



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

def title
  @title
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



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

def url
  @url
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



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

def version
  @version
end

Class Method Details

.from_hash(h) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/confluence-soap.rb', line 12

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



22
23
24
# File 'lib/confluence-soap.rb', line 22

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