Class: ActsAsAvatar::Configuration
- Inherits:
-
Object
- Object
- ActsAsAvatar::Configuration
- Defined in:
- lib/acts_as_avatar/configuration.rb
Instance Attribute Summary collapse
-
#avatar_name ⇒ Object
Returns the value of attribute avatar_name.
-
#avatar_size ⇒ Object
Returns the value of attribute avatar_size.
-
#class_type ⇒ Object
Returns the value of attribute class_type.
-
#default_file_name ⇒ Object
Returns the value of attribute default_file_name.
-
#github_complexity ⇒ Object
Returns the value of attribute github_complexity.
-
#github_render_method ⇒ Object
Returns the value of attribute github_render_method.
-
#github_rounded_circle ⇒ Object
Returns the value of attribute github_rounded_circle.
-
#inline_svg_engine ⇒ Object
Returns the value of attribute inline_svg_engine.
-
#random_image_engine ⇒ Object
Returns the value of attribute random_image_engine.
-
#uifaces_api_key ⇒ Object
Returns the value of attribute uifaces_api_key.
-
#uifaces_gender ⇒ Object
Returns the value of attribute uifaces_gender.
-
#uifaces_limit ⇒ Object
Returns the value of attribute uifaces_limit.
-
#uifaces_uri ⇒ Object
Returns the value of attribute uifaces_uri.
-
#upload_max_size ⇒ Object
Returns the value of attribute upload_max_size.
Instance Method Summary collapse
- #default_options ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/acts_as_avatar/configuration.rb', line 36 def initialize @uifaces_uri = "https://api.uifaces.co" @uifaces_api_key = "72694e5b5dee4706edc0acad3d4291" @uifaces_gender = nil @uifaces_limit = 72 @random_image_engine = nil @default_file_name = "default_avatar" @upload_max_size = 2.megabytes @class_type = %w[User] @avatar_name = :name @inline_svg_engine = :initial_avatar @avatar_size = 60 @github_complexity = 5 @github_render_method = "square" @github_rounded_circle = false end |
Instance Attribute Details
#avatar_name ⇒ Object
Returns the value of attribute avatar_name.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def avatar_name @avatar_name end |
#avatar_size ⇒ Object
Returns the value of attribute avatar_size.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def avatar_size @avatar_size end |
#class_type ⇒ Object
Returns the value of attribute class_type.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def class_type @class_type end |
#default_file_name ⇒ Object
Returns the value of attribute default_file_name.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def default_file_name @default_file_name end |
#github_complexity ⇒ Object
Returns the value of attribute github_complexity.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def github_complexity @github_complexity end |
#github_render_method ⇒ Object
Returns the value of attribute github_render_method.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def github_render_method @github_render_method end |
#github_rounded_circle ⇒ Object
Returns the value of attribute github_rounded_circle.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def github_rounded_circle @github_rounded_circle end |
#inline_svg_engine ⇒ Object
Returns the value of attribute inline_svg_engine.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def inline_svg_engine @inline_svg_engine end |
#random_image_engine ⇒ Object
Returns the value of attribute random_image_engine.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def random_image_engine @random_image_engine end |
#uifaces_api_key ⇒ Object
Returns the value of attribute uifaces_api_key.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def uifaces_api_key @uifaces_api_key end |
#uifaces_gender ⇒ Object
Returns the value of attribute uifaces_gender.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def uifaces_gender @uifaces_gender end |
#uifaces_limit ⇒ Object
Returns the value of attribute uifaces_limit.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def uifaces_limit @uifaces_limit end |
#uifaces_uri ⇒ Object
Returns the value of attribute uifaces_uri.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def uifaces_uri @uifaces_uri end |
#upload_max_size ⇒ Object
Returns the value of attribute upload_max_size.
21 22 23 |
# File 'lib/acts_as_avatar/configuration.rb', line 21 def upload_max_size @upload_max_size end |
Instance Method Details
#default_options ⇒ Object
53 54 55 56 57 |
# File 'lib/acts_as_avatar/configuration.rb', line 53 def instance_variables.to_h do |key| [key.to_s.sub("@", "").to_sym, instance_variable_get(key)] end end |