Class: GovukPublishingComponents::ApplicationsPage
- Inherits:
-
Object
- Object
- GovukPublishingComponents::ApplicationsPage
- Defined in:
- app/models/govuk_publishing_components/applications_page.rb
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #gem_version ⇒ Object
-
#initialize(application) ⇒ ApplicationsPage
constructor
A new instance of ApplicationsPage.
- #readable_name ⇒ Object
- #sass_version ⇒ Object
- #slimmer_version ⇒ Object
Constructor Details
#initialize(application) ⇒ ApplicationsPage
5 6 7 8 9 |
# File 'app/models/govuk_publishing_components/applications_page.rb', line 5 def initialize(application) @application = application @dir = get_directory @gemfilelock = get_gemfile end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
3 4 5 |
# File 'app/models/govuk_publishing_components/applications_page.rb', line 3 def source @source end |
Instance Method Details
#gem_version ⇒ Object
15 16 17 |
# File 'app/models/govuk_publishing_components/applications_page.rb', line 15 def gem_version parse_file(@gemfilelock, /govuk_publishing_components \(([^)>=~ ]+)\)/) end |
#readable_name ⇒ Object
11 12 13 |
# File 'app/models/govuk_publishing_components/applications_page.rb', line 11 def readable_name @application.gsub("-", " ").capitalize end |
#sass_version ⇒ Object
23 24 25 |
# File 'app/models/govuk_publishing_components/applications_page.rb', line 23 def sass_version parse_file(@gemfilelock, /sass-embedded \(([^)>=~ ]+)\)/) end |
#slimmer_version ⇒ Object
19 20 21 |
# File 'app/models/govuk_publishing_components/applications_page.rb', line 19 def slimmer_version parse_file(@gemfilelock, /slimmer \(([^)>=~ ]+)\)/) end |