Module: Parliament::Grom::Decorator::StatutoryInstrumentPaper

Defined in:
lib/parliament/grom/decorator/statutory_instrument_paper.rb

Overview

Decorator namespace for Grom::Node instances with type: id.parliament.uk/schema/StatutoryInstrumentPaper

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#coming_into_force_dateDate?

Alias Date with fallback.

Returns:

  • (Date, nil)

    the coming into force date of the Grom::Node or nil.

Since:

  • 0.1.0



16
17
18
# File 'lib/parliament/grom/decorator/statutory_instrument_paper.rb', line 16

def coming_into_force_date
  respond_to?(:statutoryInstrumentPaperComingIntoForceDate) ? DateTime.parse(statutoryInstrumentPaperComingIntoForceDate) : nil
end

#made_dateDate?

Alias statutoryInstrumentPaperMadeDate with fallback.

Returns:

  • (Date, nil)

    the coming into force date of the Grom::Node or nil.

Since:

  • 0.1.0



9
10
11
# File 'lib/parliament/grom/decorator/statutory_instrument_paper.rb', line 9

def made_date
  respond_to?(:statutoryInstrumentPaperMadeDate) ? DateTime.parse(statutoryInstrumentPaperMadeDate) : nil
end

#proposed_negative_statutory_instrument_papersArray

Alias statutoryInstrumentPaperFollowsProposedNegativeStatutoryInstrumentPaper with fallback.

Returns:

  • (Array, Array)

    an array of ProposedNegativeStatutoryInstrumentPaper Grom::Nodes or an empty array.

Since:

  • 0.1.0



23
24
25
# File 'lib/parliament/grom/decorator/statutory_instrument_paper.rb', line 23

def proposed_negative_statutory_instrument_papers
  respond_to?(:statutoryInstrumentPaperFollowsProposedNegativeStatutoryInstrumentPaper) ? statutoryInstrumentPaperFollowsProposedNegativeStatutoryInstrumentPaper : []
end