Class: Afterburn::Authorization
- Inherits:
-
Object
- Object
- Afterburn::Authorization
- Includes:
- Trello, Trello::Authorization
- Defined in:
- lib/afterburn/authorization.rb
Instance Attribute Summary collapse
-
#trello_app_token ⇒ Object
Returns the value of attribute trello_app_token.
-
#trello_user_key ⇒ Object
Returns the value of attribute trello_user_key.
-
#trello_user_secret ⇒ Object
Returns the value of attribute trello_user_secret.
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
-
#initialize(member_name) ⇒ Authorization
constructor
A new instance of Authorization.
- #member ⇒ Object
Constructor Details
#initialize(member_name) ⇒ Authorization
Returns a new instance of Authorization.
8 9 10 |
# File 'lib/afterburn/authorization.rb', line 8 def initialize(member_name) @member_name = member_name end |
Instance Attribute Details
#trello_app_token ⇒ Object
Returns the value of attribute trello_app_token.
6 7 8 |
# File 'lib/afterburn/authorization.rb', line 6 def trello_app_token @trello_app_token end |
#trello_user_key ⇒ Object
Returns the value of attribute trello_user_key.
6 7 8 |
# File 'lib/afterburn/authorization.rb', line 6 def trello_user_key @trello_user_key end |
#trello_user_secret ⇒ Object
Returns the value of attribute trello_user_secret.
6 7 8 |
# File 'lib/afterburn/authorization.rb', line 6 def trello_user_secret @trello_user_secret end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/afterburn/authorization.rb', line 12 def configure yield self if block_given? Trello::Authorization.const_set :AuthPolicy, OAuthPolicy OAuthPolicy.consumer_credential = OAuthCredential.new trello_user_key, trello_user_secret OAuthPolicy.token = OAuthCredential.new trello_app_token, nil Afterburn::Member.add_member(member) end |
#member ⇒ Object
32 33 34 |
# File 'lib/afterburn/authorization.rb', line 32 def member Afterburn::Member.find(@member_name) end |