alexa-rails 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 001336e95e973905558ab857fecc393864551db4b7df2c04bd124aac1f77e331
4
- data.tar.gz: 061bdee33141e901ea6e982dab832e36fddf45e004a224cc5f8664ceab0e30d6
3
+ metadata.gz: fe84c01c500b20b605df841f3223b47fb2d2d0caa4b42ec2f4106defdc6d0098
4
+ data.tar.gz: a3d781d08f0df84165ec47a26db26a285c40a5918932dee673d848f924dc36d9
5
5
  SHA512:
6
- metadata.gz: 41ac14a94e1365ea9826fec1af58616fcb4bc7e45558aca6c042b3d4ff53599bae88d7f27340bc5830ab3dbc56f70e3e5f0ebee16fb6ce70096f6acb2af830cb
7
- data.tar.gz: cd0bd0560a446542dd965dbe746785681f95568793caca8e48ddc268e9b0ea2c6fb441c5abcb1acedd618b2d8228c3d9bf1ab25d83d7fbeb36762b95bab711e9
6
+ metadata.gz: fda2ea136306cfcdd4a4abc4a567062173da26b21598928c5ad5a07c1e307af3c8667f06a0a419db4e4a600f63d3de470b1ed43970ae5a3b3da6255087d5e60e
7
+ data.tar.gz: 296c90180fe93257c458acd12f6d532392645d893f7d2a38466dc575916646299bc14a1ce95bdff42eccd39b0c8a48ec3db9f3b7db443f6277b3214608846563
@@ -20,6 +20,22 @@ module Alexa
20
20
  request.locale
21
21
  end
22
22
 
23
+ ##
24
+ # Returns country code from locale. Always in lowercase
25
+ ##
26
+ def country_code
27
+ return nil if locale.nil?
28
+ @_country_code ||= locale.split("-").last.downcase
29
+ end
30
+
31
+ ##
32
+ # Returns language code from locale. Always in lowercase
33
+ ##
34
+ def language_code
35
+ return nil if locale.nil?
36
+ @_language_code ||= locale.split("-").first.downcase
37
+ end
38
+
23
39
  def device
24
40
  @_device ||= Alexa::Device.new(
25
41
  attributes: request.params["context"]["System"]["device"],
@@ -84,21 +84,5 @@ module Alexa
84
84
  def locale
85
85
  params["request"]["locale"]
86
86
  end
87
-
88
- ##
89
- # Returns country code from locale. Always in lowercase
90
- ##
91
- def country_code
92
- return nil if locale.nil?
93
- @_country_code ||= locale.split("-").last.downcase
94
- end
95
-
96
- ##
97
- # Returns language code from locale. Always in lowercase
98
- ##
99
- def language_code
100
- return nil if locale.nil?
101
- @_language_code ||= locale.split("-").first.downcase
102
- end
103
87
  end
104
88
  end
@@ -1,3 +1,3 @@
1
1
  module Alexa
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexa-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sri Vishnu Totakura