Class
Attributes
Read & Write
No documentation available
Read & Write
No documentation available
Class Methods
::
lib/rss/maker/base.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/rss/maker/base.rb, line 676
def initialize(maker)
super
@do_sort = false
@max_size = -1
end
No documentation available
Instance Methods
lib/rss/maker/base.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/rss/maker/base.rb, line 682
def normalize
if @max_size >= 0
sort_if_need[0...@max_size]
else
sort_if_need[0..@max_size]
end
end
No documentation available
lib/rss/maker/base.rb
View on GitHub
# File tmp/rubies/ruby-2.7.6/lib/rss/maker/base.rb, line 691
def sort_if_need
if @do_sort.respond_to?(:call)
@items.sort do |x, y|
@do_sort.call(x, y)
end
elsif @do_sort
@items.sort do |x, y|
y <=> x
end
else
@items
end
end
No documentation available