Method: RTFDoc::Group#initialize

Defined in:
lib/rtfdoc.rb

#initialize(name, resources, options = {}) ⇒ Group

Returns a new instance of Group.



398
399
400
401
402
403
404
405
# File 'lib/rtfdoc.rb', line 398

def initialize(name, resources, options = {})
  @name       = name
  @resources  = resources

  sorted = true
  sorted = options['sort'] if options.key?('sort')
  @resources.sort! { |a, b| a.name <=> b.name } if sorted
end