Class: EacLauncher::Instances::Settings
- Inherits:
-
Object
- Object
- EacLauncher::Instances::Settings
- Defined in:
- lib/eac_launcher/instances/settings.rb
Instance Method Summary collapse
- #git_current_revision ⇒ Object
- #git_publish_remote ⇒ Object
-
#initialize(data) ⇒ Settings
constructor
A new instance of Settings.
- #publishable? ⇒ Boolean
Constructor Details
#initialize(data) ⇒ Settings
Returns a new instance of Settings.
6 7 8 |
# File 'lib/eac_launcher/instances/settings.rb', line 6 def initialize(data) @data = ActiveSupport::HashWithIndifferentAccess.new(data.is_a?(Hash) ? data : {}) end |
Instance Method Details
#git_current_revision ⇒ Object
10 11 12 |
# File 'lib/eac_launcher/instances/settings.rb', line 10 def git_current_revision @data[__method__] || 'origin/master' end |
#git_publish_remote ⇒ Object
14 15 16 |
# File 'lib/eac_launcher/instances/settings.rb', line 14 def git_publish_remote @data[__method__] || 'publish' end |
#publishable? ⇒ Boolean
18 19 20 |
# File 'lib/eac_launcher/instances/settings.rb', line 18 def publishable? @data.key?(:publishable) ? @data[:publishable] : true end |