Class: PostyClient::Resources::UserAlias
- Extended by:
- FinderConcern
- Defined in:
- lib/posty_client/resources/user_alias.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Attributes inherited from Base
#attributes, #errors, #name, #new_resource
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(user, name = nil) ⇒ UserAlias
constructor
A new instance of UserAlias.
- #resource_slug ⇒ Object
- #slug ⇒ Object
Methods included from FinderConcern
find_all_by_domain, find_all_by_user
Methods inherited from Base
#create, #delete, #load, #new_resource?, #request_with_error_handling, #resource_name, #save, #update
Constructor Details
#initialize(user, name = nil) ⇒ UserAlias
Returns a new instance of UserAlias.
10 11 12 13 14 |
# File 'lib/posty_client/resources/user_alias.rb', line 10 def initialize(user, name=nil) @user = user @name = name load if name end |
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
8 9 10 |
# File 'lib/posty_client/resources/user_alias.rb', line 8 def user @user end |
Class Method Details
.resource_name ⇒ Object
24 25 26 |
# File 'lib/posty_client/resources/user_alias.rb', line 24 def self.resource_name :aliases end |
Instance Method Details
#resource_slug ⇒ Object
20 21 22 |
# File 'lib/posty_client/resources/user_alias.rb', line 20 def resource_slug [user.slug, 'aliases'].join('/') end |
#slug ⇒ Object
16 17 18 |
# File 'lib/posty_client/resources/user_alias.rb', line 16 def slug [resource_slug, name].join('/') end |