Class: ZendeskAppsSupport::Manifest::LocationOptions
- Inherits:
-
Object
- Object
- ZendeskAppsSupport::Manifest::LocationOptions
- Defined in:
- lib/zendesk_apps_support/manifest/location_options.rb
Constant Summary collapse
- RUBY_TO_JSON =
{ legacy: 'legacy', auto_load: 'autoLoad', auto_hide: 'autoHide', signed: 'signed', url: 'url' }.freeze
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
-
#initialize(location, options) ⇒ LocationOptions
constructor
A new instance of LocationOptions.
Constructor Details
#initialize(location, options) ⇒ LocationOptions
Returns a new instance of LocationOptions.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/zendesk_apps_support/manifest/location_options.rb', line 21 def initialize(location, ) @location = location RUBY_TO_JSON.each do |ruby, json| instance_variable_set(:"@#{ruby}", [json]) end @legacy ||= @url == ZendeskAppsSupport::Manifest::LEGACY_URI_STUB @auto_load = .fetch('autoLoad', true) @auto_hide ||= false @signed ||= false end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
13 14 15 |
# File 'lib/zendesk_apps_support/manifest/location_options.rb', line 13 def location @location end |