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
1098
1099
1100
|
# File 'lib/atomutil.rb', line 1098
def generator
get_object(Namespace::ATOM, 'generator', Generator)
end
|
#generator=(gen) ⇒ Object
1102
1103
1104
1105
|
# File 'lib/atomutil.rb', line 1102
def generator=(gen)
gen = gen.is_a?(Generator) ? gen : Generator.new(:name => gen)
set(Namespace::ATOM, 'generator', gen)
end
|
#items_per_page ⇒ Object
1089
1090
1091
1092
|
# File 'lib/atomutil.rb', line 1089
def items_per_page
value = get(Namespace::OPEN_SEARCH, 'itemsPerPage')
value.nil?? nil : value.text.to_i
end
|
#items_per_page=(num) ⇒ Object
1094
1095
1096
|
# File 'lib/atomutil.rb', line 1094
def items_per_page=(num)
set(Namespace::OPEN_SEARCH, 'itemsPerPage', num.to_s)
end
|
#language ⇒ Object
1107
1108
1109
|
# File 'lib/atomutil.rb', line 1107
def language
@elem.attributes['xml:lang']
end
|
#language=(lang) ⇒ Object
1111
1112
1113
1114
|
# File 'lib/atomutil.rb', line 1111
def language=(lang)
@elem.add_attribute 'xml:lang', lang
end
|
#start_index ⇒ Object
1080
1081
1082
1083
|
# File 'lib/atomutil.rb', line 1080
def start_index
value = get(Namespace::OPEN_SEARCH, 'startIndex')
value.nil?? nil : value.text.to_i
end
|
#start_index=(num) ⇒ Object
1085
1086
1087
|
# File 'lib/atomutil.rb', line 1085
def start_index=(num)
set(Namespace::OPEN_SEARCH, 'startIndex', num.to_s)
end
|
#total_results ⇒ Object
1071
1072
1073
1074
|
# File 'lib/atomutil.rb', line 1071
def total_results
value = get(Namespace::OPEN_SEARCH, 'totalResults')
value.nil?? nil : value.text.to_i
end
|
#total_results=(num) ⇒ Object
1076
1077
1078
|
# File 'lib/atomutil.rb', line 1076
def total_results=(num)
set(Namespace::OPEN_SEARCH, 'totalResults', num.to_s)
end
|
#version ⇒ Object
1116
1117
1118
|
# File 'lib/atomutil.rb', line 1116
def version
@elem.attributes['version']
end
|
#version=(ver) ⇒ Object
1120
1121
1122
|
# File 'lib/atomutil.rb', line 1120
def version=(ver)
@elem.add_attribute 'version', ver
end
|