Module: Pushme
- Defined in:
- lib/pushme/aws.rb,
lib/pushme/aws/version.rb,
lib/generators/pushme/install_generator.rb
Defined Under Namespace
Modules: Aws, Generators
Class Method Summary collapse
- .config ⇒ Object
- .device_types ⇒ Object
- .device_types=(types) ⇒ Object
- .setup {|_self| ... } ⇒ Object
- .table_name ⇒ Object
- .table_name=(table_name) ⇒ Object
- .valid_device_types ⇒ Object
Class Method Details
.config ⇒ Object
37 38 39 |
# File 'lib/pushme/aws.rb', line 37 def config @config end |
.device_types ⇒ Object
41 42 43 |
# File 'lib/pushme/aws.rb', line 41 def device_types @config[:device_types] end |
.device_types=(types) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/pushme/aws.rb', line 21 def device_types=(types) raise ArgumentError, 'Argument must be an array of symbols' unless types.is_a?(Array) types.each do |type| raise ArgumentError, "Invalid type #{type}. The valid options are #{VALID_DEVICE_TYPES.join(', ')}" unless VALID_DEVICE_TYPES.include?(type) end @config[:device_types] = types end |
.setup {|_self| ... } ⇒ Object
17 18 19 |
# File 'lib/pushme/aws.rb', line 17 def setup yield self end |
.table_name ⇒ Object
45 46 47 |
# File 'lib/pushme/aws.rb', line 45 def table_name @config[:table_name] end |
.table_name=(table_name) ⇒ Object
31 32 33 34 35 |
# File 'lib/pushme/aws.rb', line 31 def table_name=(table_name) raise ArgumentError, 'Argument must be a string' unless table_name.is_a?(String) @config[:table_name] = table_name.to_sym end |
.valid_device_types ⇒ Object
49 50 51 |
# File 'lib/pushme/aws.rb', line 49 def valid_device_types VALID_DEVICE_TYPES end |