Class: WebForm

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash_) ⇒ WebForm

Returns a new instance of WebForm.



24
25
26
# File 'lib/key.rb', line 24

def initialize(hash_)
	@notes_plain, @fields = hash_.values_at("notesPlain", "fields")
end

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



22
23
24
# File 'lib/key.rb', line 22

def fields
  @fields
end

Instance Method Details

#find(name) ⇒ Object



28
29
30
31
# File 'lib/key.rb', line 28

def find(name)
	field = @fields.select {|f| f["name"] == name || f["designation"] == name}.first
	field["value"]
end