Class: MosEisley::Config
- Inherits:
-
Object
- Object
- MosEisley::Config
- Defined in:
- lib/mos-eisley-lambda.rb
Instance Attribute Summary collapse
-
#bot_access_token ⇒ Object
readonly
Returns the value of attribute bot_access_token.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#signing_secret ⇒ Object
readonly
Returns the value of attribute signing_secret.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #arn ⇒ Object
-
#initialize(context, data) ⇒ Config
constructor
A new instance of Config.
- #remaining_time ⇒ Object
Constructor Details
#initialize(context, data) ⇒ Config
Returns a new instance of Config.
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/mos-eisley-lambda.rb', line 197 def initialize(context, data) data.each do |k, v| instance_variable_set("@#{k}", v) end @context = context @info = { handlers: { action: MosEisley.handlers[:action].length, command_response: MosEisley.handlers[:command_response].length, command: MosEisley.handlers[:command].length, event: MosEisley.handlers[:event].length, }, versions: { mos_eisley: MosEisley::VERSION, neko_http: Neko::HTTP::VERSION, s3po: MosEisley::S3PO::VERSION, s3po_blockkit: MosEisley::S3PO::BlockKit::VERSION, }, } = Time.now end |
Instance Attribute Details
#bot_access_token ⇒ Object (readonly)
Returns the value of attribute bot_access_token.
195 196 197 |
# File 'lib/mos-eisley-lambda.rb', line 195 def bot_access_token @bot_access_token end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
194 195 196 |
# File 'lib/mos-eisley-lambda.rb', line 194 def context @context end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
194 195 196 |
# File 'lib/mos-eisley-lambda.rb', line 194 def info @info end |
#signing_secret ⇒ Object (readonly)
Returns the value of attribute signing_secret.
195 196 197 |
# File 'lib/mos-eisley-lambda.rb', line 195 def signing_secret @signing_secret end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
194 195 196 |
# File 'lib/mos-eisley-lambda.rb', line 194 def end |
Instance Method Details
#arn ⇒ Object
219 220 221 |
# File 'lib/mos-eisley-lambda.rb', line 219 def arn context.invoked_function_arn end |
#remaining_time ⇒ Object
223 224 225 |
# File 'lib/mos-eisley-lambda.rb', line 223 def remaining_time context.get_remaining_time_in_millis end |