Class: Passwordstate::Resources::PasswordList::HideConfig

Inherits:
Struct
  • Object
show all
Defined in:
lib/passwordstate/resources/password_list.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#adminObject

Returns the value of attribute admin

Returns:

  • (Object)

    the current value of admin



6
7
8
# File 'lib/passwordstate/resources/password_list.rb', line 6

def admin
  @admin
end

#modifyObject

Returns the value of attribute modify

Returns:

  • (Object)

    the current value of modify



6
7
8
# File 'lib/passwordstate/resources/password_list.rb', line 6

def modify
  @modify
end

#viewObject

Returns the value of attribute view

Returns:

  • (Object)

    the current value of view



6
7
8
# File 'lib/passwordstate/resources/password_list.rb', line 6

def view
  @view
end

Class Method Details

.parse(str) ⇒ Object



7
8
9
10
11
# File 'lib/passwordstate/resources/password_list.rb', line 7

def self.parse(str)
  view, modify, admin = str.split(':').map { |b| b.to_s.downcase == 'true' }

  new view, modify, admin
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/passwordstate/resources/password_list.rb', line 13

def to_s
  "#{view}:#{modify}:#{admin}"
end