Class: TFClient::Models::Owner

Inherits:
Model
  • Object
show all
Defined in:
lib/textflight-client/models/scan.rb

Instance Attribute Summary collapse

Attributes inherited from Model

#label, #translation, #values_hash

Instance Method Summary collapse

Constructor Details

#initialize(line:) ⇒ Owner

Returns a new instance of Owner.



82
83
84
85
# File 'lib/textflight-client/models/scan.rb', line 82

def initialize(line:)
  super(line: line)
  @username = @values_hash[:username]
end

Instance Attribute Details

#usernameObject (readonly)

Returns the value of attribute username.



80
81
82
# File 'lib/textflight-client/models/scan.rb', line 80

def username
  @username
end

Instance Method Details

#to_sObject



87
88
89
# File 'lib/textflight-client/models/scan.rb', line 87

def to_s
  "#{@translation}: #{@username}"
end