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



51
52
53
# File 'lib/parliament/grom/decorator/statutory_instrument_paper.rb', line 51

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

#coming_into_force_noteString

Alias statutoryInstrumentPaperComingIntoForceNote with fallback.

Returns:

  • (String, String)

    the coming into force date of the Grom::Node or an empty string.

Since:

  • 0.1.0



44
45
46
# File 'lib/parliament/grom/decorator/statutory_instrument_paper.rb', line 44

def coming_into_force_note
  respond_to?(:statutoryInstrumentPaperComingIntoForceNote) ? statutoryInstrumentPaperComingIntoForceNote : ''
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



37
38
39
# File 'lib/parliament/grom/decorator/statutory_instrument_paper.rb', line 37

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

#nameString

Alias statutoryInstrumentPaperName with fallback.

Returns:

  • (String, String)

    the name of the Grom::Node or an empty string.

Since:

  • 0.1.0



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

def name
  respond_to?(:statutoryInstrumentPaperName) ? statutoryInstrumentPaperName : ''
end

#numberString

Alias statutoryInstrumentPaperNumber with fallback.

Returns:

  • (String, String)

    the number of the Grom::Node or an empty string.

Since:

  • 0.1.0



30
31
32
# File 'lib/parliament/grom/decorator/statutory_instrument_paper.rb', line 30

def number
  respond_to?(:statutoryInstrumentPaperNumber) ? statutoryInstrumentPaperNumber : ''
end

#prefixString

Alias statutoryInstrumentPaperPrefix with fallback.

Returns:

  • (String, String)

    the prefix of the Grom::Node or an empty string.

Since:

  • 0.1.0



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

def prefix
  respond_to?(:statutoryInstrumentPaperPrefix) ? statutoryInstrumentPaperPrefix : ''
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



58
59
60
# File 'lib/parliament/grom/decorator/statutory_instrument_paper.rb', line 58

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

#yearString

Alias statutoryInstrumentPaperYear with fallback.

Returns:

  • (String, String)

    the year of the Grom::Node or an empty string.

Since:

  • 0.1.0



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

def year
  respond_to?(:statutoryInstrumentPaperYear) ? statutoryInstrumentPaperYear : ''
end