Class: Wiki2Go::PageContext

Inherits:
Object
  • Object
show all
Defined in:
lib/Wiki2Go/WikiFormatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, formatter, text, page, web, pages, searchtopic, title) ⇒ PageContext

Returns a new instance of PageContext.


23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/Wiki2Go/WikiFormatter.rb', line 23

def initialize(config,formatter,text,page,web,pages,searchtopic,title)
  @config = config
  @format = formatter 
  @web = web 
  @page = page
  @text = text
  @pages = pages
  @searchtopic = searchtopic
  @title = title
  @from = -1
  @to = -1  
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config


18
19
20
# File 'lib/Wiki2Go/WikiFormatter.rb', line 18

def config
  @config
end

#formatObject (readonly)

Returns the value of attribute format


12
13
14
# File 'lib/Wiki2Go/WikiFormatter.rb', line 12

def format
  @format
end

#fromObject (readonly)

Returns the value of attribute from


20
21
22
# File 'lib/Wiki2Go/WikiFormatter.rb', line 20

def from
  @from
end

#pageObject (readonly)

Returns the value of attribute page


14
15
16
# File 'lib/Wiki2Go/WikiFormatter.rb', line 14

def page
  @page
end

#pagesObject (readonly)

Returns the value of attribute pages


16
17
18
# File 'lib/Wiki2Go/WikiFormatter.rb', line 16

def pages
  @pages
end

#searchtopicObject (readonly)

Returns the value of attribute searchtopic


17
18
19
# File 'lib/Wiki2Go/WikiFormatter.rb', line 17

def searchtopic
  @searchtopic
end

#textObject (readonly)

Returns the value of attribute text


15
16
17
# File 'lib/Wiki2Go/WikiFormatter.rb', line 15

def text
  @text
end

#titleObject

Returns the value of attribute title


19
20
21
# File 'lib/Wiki2Go/WikiFormatter.rb', line 19

def title
  @title
end

#toObject (readonly)

Returns the value of attribute to


21
22
23
# File 'lib/Wiki2Go/WikiFormatter.rb', line 21

def to
  @to
end

#webObject (readonly)

Returns the value of attribute web


13
14
15
# File 'lib/Wiki2Go/WikiFormatter.rb', line 13

def web
  @web
end

Instance Method Details

#versions(from, to) ⇒ Object


36
37
38
39
40
41
42
43
44
# File 'lib/Wiki2Go/WikiFormatter.rb', line 36

def versions(from,to)
  if to > 0 then
    @to = to
    @from = from
  else
    @from = -1
    @to = -1
  end
end