Class: Avmtrf1::Red::Profile
- Inherits:
-
Object
- Object
- Avmtrf1::Red::Profile
- Includes:
- Helper, EacRubyUtils::SimpleCache
- Defined in:
- lib/avmtrf1/red/profile.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#metadados ⇒ Object
readonly
Returns the value of attribute metadados.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client, metadados) ⇒ Profile
constructor
A new instance of Profile.
- #put_file(file_path) ⇒ Object
- #server ⇒ Object
Methods included from Helper
#check_request_result, #http_client, #post, #post_xml, #xml_content, #xml_path
Constructor Details
#initialize(client, metadados) ⇒ Profile
Returns a new instance of Profile.
26 27 28 29 |
# File 'lib/avmtrf1/red/profile.rb', line 26 def initialize(client, ) @client = client @metadados = .dup.freeze end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
22 23 24 |
# File 'lib/avmtrf1/red/profile.rb', line 22 def client @client end |
#metadados ⇒ Object (readonly)
Returns the value of attribute metadados.
22 23 24 |
# File 'lib/avmtrf1/red/profile.rb', line 22 def @metadados end |
Class Method Details
.by_ini_profile(ini_profile) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/avmtrf1/red/profile.rb', line 14 def by_ini_profile(ini_profile) new( ::Avmtrf1::Red::Client.by_ini_profile(ini_profile), ini_profile.to_h('metadados.') ) end |
Instance Method Details
#put_file(file_path) ⇒ Object
31 32 33 34 35 |
# File 'lib/avmtrf1/red/profile.rb', line 31 def put_file(file_path) auth_url = client. infov 'Authorization URL', auth_url put_file_request(auth_url, file_path) end |
#server ⇒ Object
37 38 39 |
# File 'lib/avmtrf1/red/profile.rb', line 37 def server client.server end |