Class: OracleEbsAuthentication::Security::Bytes

Inherits:
String
  • Object
show all
Defined in:
lib/oracle_ebs_authentication/security.rb

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Bytes

Returns a new instance of Bytes.



13
14
15
# File 'lib/oracle_ebs_authentication/security.rb', line 13

def initialize(string)
  super(string.force_encoding('ASCII-8BIT'))
end

Instance Method Details

#[](*args) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/oracle_ebs_authentication/security.rb', line 17

def [](*args)
  if args.length == 1
    super(*args).ord
  else
    super
  end
end

#[]=(*args) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/oracle_ebs_authentication/security.rb', line 25

def []=(*args)
  if args.length == 2
    super(args[0], args[1].chr)
  else
    super
  end
end