Class: DynamicPDFApi::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_client/Elements/Element.rb

Overview

Base class from which all page elements are derived.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value = nil, placement = nil, x_offset = 0, y_offset = 0) ⇒ Element

Returns a new instance of Element.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/ruby_client/Elements/Element.rb', line 8

def initialize(value = nil, placement = nil, x_offset = 0, y_offset = 0)
  @even_pages = nil
  @odd_pages = nil
  @_text_font = nil
  @_resource = nil
  @_type = nil
  @_input_value = value
  @placement = placement
  @x_offset = x_offset
  @y_offset = y_offset
end

Instance Attribute Details

#_input_valueObject

Returns the value of attribute _input_value.



19
20
21
# File 'lib/ruby_client/Elements/Element.rb', line 19

def _input_value
  @_input_value
end

#_resourceObject

Returns the value of attribute _resource.



19
20
21
# File 'lib/ruby_client/Elements/Element.rb', line 19

def _resource
  @_resource
end

#_text_fontObject

Returns the value of attribute _text_font.



19
20
21
# File 'lib/ruby_client/Elements/Element.rb', line 19

def _text_font
  @_text_font
end

#_typeObject

Returns the value of attribute _type.



19
20
21
# File 'lib/ruby_client/Elements/Element.rb', line 19

def _type
  @_type
end

#even_pagesObject

Gets or sets the boolean value specifying whether the element should be added to even pages or not.



39
40
41
# File 'lib/ruby_client/Elements/Element.rb', line 39

def even_pages
  @even_pages
end

#odd_pagesObject

Gets or sets the boolean value specifying whether the element should be added to odd pages or not.



44
45
46
# File 'lib/ruby_client/Elements/Element.rb', line 44

def odd_pages
  @odd_pages
end

#placementObject

Gets and sets placement of the page element on the page.



24
25
26
# File 'lib/ruby_client/Elements/Element.rb', line 24

def placement
  @placement
end

#x_offsetObject

Gets or sets the X coordinate of the page element.



29
30
31
# File 'lib/ruby_client/Elements/Element.rb', line 29

def x_offset
  @x_offset
end

#y_offsetObject

Gets or sets the Y coordinate of the page element.



34
35
36
# File 'lib/ruby_client/Elements/Element.rb', line 34

def y_offset
  @y_offset
end