Class: Sapphire::WebAbstractions::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/sapphire/WebAbstractions/Controls/Base/Page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePage

Returns a new instance of Page.



11
12
13
14
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 11

def initialize()
  @fields = {}
  self.Init()
end

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



9
10
11
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 9

def fields
  @fields
end

Instance Method Details

#AlertBox(*args) ⇒ Object



64
65
66
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 64

def AlertBox(*args)
  @fields = @fields.merge! args.first => AlertBox.new(nil)
end

#AlternateUrlsObject



5
6
7
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 5

def AlternateUrls
  []
end

#Button(*args) ⇒ Object



40
41
42
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 40

def Button(*args)
  @fields = @fields.merge! args.first => Button.new(args[1..args.length])
end

#CheckBox(*args) ⇒ Object



36
37
38
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 36

def CheckBox(*args)
  @fields = @fields.merge!  args.first => CheckBox.new(args[1..args.length])
end

#Contains(item) ⇒ Object



68
69
70
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 68

def Contains(item)
  @fields.has_key? item
end

#Date(*args) ⇒ Object



60
61
62
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 60

def Date(*args)
  @fields = @fields.merge! args.first => Date.new(args[1])
end


20
21
22
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 20

def DropDown(*args)
  @fields = @fields.merge! args.first => DropDown.new(args[1..args.length])
end

#Get(item) ⇒ Object



72
73
74
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 72

def Get(item)
  @fields[item]
end


52
53
54
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 52

def Hyperlink(*args)
  @fields = @fields.merge! args.first => Hyperlink.new(args[1..args.length])
end

#Image(*args) ⇒ Object



48
49
50
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 48

def Image(*args)
  @fields = @fields.merge! args.first => Image.new(args[1..args.length])
end

#Label(*args) ⇒ Object



44
45
46
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 44

def Label(*args)
  @fields = @fields.merge! args.first => Label.new(args[1..args.length])
end

#List(*args) ⇒ Object



56
57
58
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 56

def List(*args)
  @fields = @fields.merge! args.first => List.new(args[1..args.length])
end

#RadioButton(*args) ⇒ Object



32
33
34
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 32

def RadioButton(*args)
  @fields = @fields.merge! args.first => RadioButton.new(args[1..args.length])
end

#TextArea(*args) ⇒ Object



28
29
30
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 28

def TextArea(*args)
  @fields = @fields.merge! args.first => TextArea.new(args[1..args.length])
end

#TextBox(*args) ⇒ Object



24
25
26
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 24

def TextBox(*args)
  @fields = @fields.merge! args.first => TextBox.new(args[1..args.length])
end

#Title(*args) ⇒ Object



16
17
18
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 16

def Title(*args)
  @fields = @fields.merge! args.first => Title.new(nil)
end