Class: LegislationUK::ContentsPart

Inherits:
Object
  • Object
show all
Includes:
Helper, ItemNumberHelper, LegislationUriHelper, TitleHelper, Morph
Defined in:
lib/legislation_uk.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from LegislationUriHelper

#legislation_uri

Methods included from ItemNumberHelper

#number

Methods included from TitleHelper

#title

Methods included from Helper

#return_values

Instance Attribute Details

#legislationObject

Returns the value of attribute legislation.



156
157
158
# File 'lib/legislation_uk.rb', line 156

def legislation
  @legislation
end

Instance Method Details

#blocksObject



158
159
160
# File 'lib/legislation_uk.rb', line 158

def blocks
  return_values :contents_pblocks
end

#sectionsObject



162
163
164
165
166
167
168
# File 'lib/legislation_uk.rb', line 162

def sections
  if blocks.empty?
    return_values :contents_items
  else
    blocks.collect(&:sections).flatten
  end
end