Class: ZendeskAppsSupport::Manifest::Parameter
- Inherits:
-
Object
- Object
- ZendeskAppsSupport::Manifest::Parameter
- Defined in:
- lib/zendesk_apps_support/manifest/parameter.rb
Constant Summary collapse
- TYPES =
%w[text password checkbox url number multiline hidden oauth].freeze
- ATTRIBUTES =
%i[name type required secure default].freeze
Instance Method Summary collapse
- #default? ⇒ Boolean
-
#initialize(p) ⇒ Parameter
constructor
A new instance of Parameter.
Constructor Details
#initialize(p) ⇒ Parameter
Returns a new instance of Parameter.
13 14 15 16 17 18 19 20 |
# File 'lib/zendesk_apps_support/manifest/parameter.rb', line 13 def initialize(p) @name = p['name'] @type = p['type'] || 'text' @required = p['required'] || false @secure = p['secure'] || false @has_default = p.key? 'default' @default = p['default'] if @has_default end |
Instance Method Details
#default? ⇒ Boolean
9 10 11 |
# File 'lib/zendesk_apps_support/manifest/parameter.rb', line 9 def default? @has_default end |