Class: Android::Manifest::QueriesComponent
- Inherits:
-
Object
- Object
- Android::Manifest::QueriesComponent
- Defined in:
- lib/android/manifest.rb
Overview
<intent>, <service>, <receiver> or <provider> element in <application> element of the manifest file.
Direct Known Subclasses
Constant Summary collapse
- TYPES =
component types
['package', 'intent', 'provider']
Instance Attribute Summary collapse
- #elem ⇒ REXML::Element readonly
- #intents ⇒ Array<Manifest::Queries::Intent> readonly
- #packages ⇒ Manifest::Queries::Package readonly
- #providers ⇒ Array<Manifest::Queries::Provider> readonly
-
#type ⇒ String
readonly
Type string in TYPES.
Instance Method Summary collapse
-
#initialize(elem) ⇒ QueriesComponent
constructor
A new instance of QueriesComponent.
Constructor Details
#initialize(elem) ⇒ QueriesComponent
Returns a new instance of QueriesComponent.
343 344 345 346 347 348 349 350 351 |
# File 'lib/android/manifest.rb', line 343 def initialize(elem) raise ArgumentError unless Component.valid?(elem) @elem = elem @type = elem.name @packages = parse_packages @intents = parse_intents @providers = parse_providers end |
Instance Attribute Details
#elem ⇒ REXML::Element (readonly)
339 340 341 |
# File 'lib/android/manifest.rb', line 339 def elem @elem end |
#intents ⇒ Array<Manifest::Queries::Intent> (readonly)
335 336 337 |
# File 'lib/android/manifest.rb', line 335 def intents @intents end |
#packages ⇒ Manifest::Queries::Package (readonly)
333 334 335 |
# File 'lib/android/manifest.rb', line 333 def packages @packages end |
#providers ⇒ Array<Manifest::Queries::Provider> (readonly)
337 338 339 |
# File 'lib/android/manifest.rb', line 337 def providers @providers end |
#type ⇒ String (readonly)
Returns type string in TYPES.
331 332 333 |
# File 'lib/android/manifest.rb', line 331 def type @type end |