Class: Flumtter::Account
- Inherits:
-
Object
- Object
- Flumtter::Account
- Defined in:
- lib/flumtter/app/core/account_selector.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
-
#screen_name ⇒ Object
readonly
Returns the value of attribute screen_name.
Instance Method Summary collapse
-
#initialize(options) ⇒ Account
constructor
A new instance of Account.
Constructor Details
#initialize(options) ⇒ Account
Returns a new instance of Account.
9 10 11 12 13 14 15 16 |
# File 'lib/flumtter/app/core/account_selector.rb', line 9 def initialize() raise ArgumentError, "Argument is not hash" unless .is_a?(Hash) keys = %i(consumer_key consumer_secret access_token access_token_secret) .requires(*%i(screen_name)+keys) @screen_name = [:screen_name] @id = [:id] @keys = Hash[keys.zip .values_at(*keys)] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/flumtter/app/core/account_selector.rb', line 8 def id @id end |
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
8 9 10 |
# File 'lib/flumtter/app/core/account_selector.rb', line 8 def keys @keys end |
#screen_name ⇒ Object (readonly)
Returns the value of attribute screen_name.
8 9 10 |
# File 'lib/flumtter/app/core/account_selector.rb', line 8 def screen_name @screen_name end |