Method: AEMO::NMI::Allocation#initialize
- Defined in:
- lib/aemo/nmi/allocation.rb
#initialize(title, type, opts = {}) ⇒ AEMO::NMI::Allocation
Initialises an AEMO::NMI::Allocation
440 441 442 443 444 445 446 447 448 |
# File 'lib/aemo/nmi/allocation.rb', line 440 def initialize(title, type, opts = {}) @title = title @type = parse_allocation_type(type) @identifier = opts.fetch(:participant_id, title.upcase) @friendly_title = opts.fetch(:friendly_title, title) @exclude_nmi_patterns = opts.fetch(:excludes, []) @include_nmi_patterns = opts.fetch(:includes, []) @region = AEMO::Region.new(opts.fetch(:region)) if opts[:region] end |