Class: ViewActionAdapter
Instance Method Summary
collapse
#build_url
Constructor Details
#initialize(targetID, text = nil) ⇒ ViewActionAdapter
Returns a new instance of ViewActionAdapter.
933
934
935
936
937
|
# File 'lib/ribit/action.rb', line 933
def initialize( targetID, text=nil )
@targetID = targetID.to_s
@linkText = text
end
|
Instance Method Details
#get_url ⇒ Object
951
952
953
954
955
|
# File 'lib/ribit/action.rb', line 951
def get_url
propertyList = PropertyList.new
propertyList.put( Constants::PAGE_ID_REQUEST_PARAM_NAME, @targetID )
return build_url( ViewAction::ID, propertyList )
end
|
#process(element) ⇒ Object
940
941
942
943
944
945
946
947
948
|
# File 'lib/ribit/action.rb', line 940
def process( element )
element.attributes['href'] = get_url()
if ( @linkText != nil )
element.text = @linkText
end
end
|
#to_ele ⇒ Object
958
959
960
961
962
963
|
# File 'lib/ribit/action.rb', line 958
def to_ele
element = REXML::Element.new( 'a' )
element.attributes['href'] = get_url()
element.text = @linkText
return element
end
|