Method: Confetti::Config#initialize
- Defined in:
- lib/confetti/config.rb
#initialize(*args) ⇒ Config
Returns a new instance of Config.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/confetti/config.rb', line 31 def initialize( *args ) @author = Author.new @name = Name.new @license = License.new @content = Content.new @icon_set = TypedSet.new Image @plist_icon_set = [] @feature_set = TypedSet.new Feature @platform_set = TypedSet.new Platform @splash_set = TypedSet.new Image @preference_set = TypedSet.new Preference @access_set = TypedSet.new Access @url_scheme_set = TypedSet.new UrlScheme # defined in PhoneGap module @plugin_set = TypedSet.new Plugin @viewmodes = [] return if args.empty? input = args.first if is_file?( input ) || File.extname( input ) == ".xml" populate_from_xml input elsif input.kind_of?( String ) populate_from_string input end end |