Class: Atom::Feed
Overview
Instance Attribute Summary
Attributes inherited from Element
#elem
Instance Method Summary
collapse
Methods inherited from CoreElement
#add_alternate_link, #alternate_link, #alternate_link=, #alternate_links, element_link_accessor, element_link_accessors, #initialize
Methods inherited from RootElement
#initialize
Methods inherited from Element
#add, element_attr_accessor, element_attr_accessors, element_datetime_accessor, element_datetime_accessors, element_name, element_ns, element_object_list_accessor, element_text_accessor, element_text_accessors, element_text_list_accessor, #get, #get_attr, #get_object, #get_objects, #getlist, #initialize, new, ns, #set, #set_attr, #to_s
Instance Method Details
#generator ⇒ Object
1095
1096
1097
|
# File 'lib/atomutil.rb', line 1095
def generator
get_object(Namespace::ATOM, 'generator', Generator)
end
|
#generator=(gen) ⇒ Object
1099
1100
1101
1102
|
# File 'lib/atomutil.rb', line 1099
def generator=(gen)
gen = gen.is_a?(Generator) ? gen : Generator.new(:name => gen)
set(Namespace::ATOM, 'generator', gen)
end
|
#items_per_page ⇒ Object
1086
1087
1088
1089
|
# File 'lib/atomutil.rb', line 1086
def items_per_page
value = get(Namespace::OPEN_SEARCH, 'itemsPerPage')
value.nil?? nil : value.text.to_i
end
|
#items_per_page=(num) ⇒ Object
1091
1092
1093
|
# File 'lib/atomutil.rb', line 1091
def items_per_page=(num)
set(Namespace::OPEN_SEARCH, 'itemsPerPage', num.to_s)
end
|
#language ⇒ Object
1104
1105
1106
|
# File 'lib/atomutil.rb', line 1104
def language
@elem.attributes['xml:lang']
end
|
#language=(lang) ⇒ Object
1108
1109
1110
1111
|
# File 'lib/atomutil.rb', line 1108
def language=(lang)
@elem.add_attribute 'xml:lang', lang
end
|
#start_index ⇒ Object
1077
1078
1079
1080
|
# File 'lib/atomutil.rb', line 1077
def start_index
value = get(Namespace::OPEN_SEARCH, 'startIndex')
value.nil?? nil : value.text.to_i
end
|
#start_index=(num) ⇒ Object
1082
1083
1084
|
# File 'lib/atomutil.rb', line 1082
def start_index=(num)
set(Namespace::OPEN_SEARCH, 'startIndex', num.to_s)
end
|
#total_results ⇒ Object
1068
1069
1070
1071
|
# File 'lib/atomutil.rb', line 1068
def total_results
value = get(Namespace::OPEN_SEARCH, 'totalResults')
value.nil?? nil : value.text.to_i
end
|
#total_results=(num) ⇒ Object
1073
1074
1075
|
# File 'lib/atomutil.rb', line 1073
def total_results=(num)
set(Namespace::OPEN_SEARCH, 'totalResults', num.to_s)
end
|
#version ⇒ Object
1113
1114
1115
|
# File 'lib/atomutil.rb', line 1113
def version
@elem.attributes['version']
end
|
#version=(ver) ⇒ Object
1117
1118
1119
|
# File 'lib/atomutil.rb', line 1117
def version=(ver)
@elem.add_attribute 'version', ver
end
|