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', flexible: 'flexible', signed: 'signed', url: 'url', size: 'size' }.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.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/zendesk_apps_support/manifest/location_options.rb', line 24 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.
16 17 18 |
# File 'lib/zendesk_apps_support/manifest/location_options.rb', line 16 def location @location end |