Class: PiFi::Streams

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/pifi/lib/streams.rb

Instance Method Summary collapse

Methods included from Utils

#file_to_hash

Constructor Details

#initialize(path_pub, path_priv = "") ⇒ Streams

Returns a new instance of Streams.



7
8
9
10
11
# File 'lib/pifi/lib/streams.rb', line 7

def initialize(path_pub, path_priv="")
  @path_pub = path_pub
  @path_priv = path_priv
  check_paths
end

Instance Method Details

#allObject



13
14
15
# File 'lib/pifi/lib/streams.rb', line 13

def all
  @all ||= pub.merge(priv)
end

#pubObject



17
18
19
# File 'lib/pifi/lib/streams.rb', line 17

def pub
  @pub ||= file_to_hash(@path_pub)
end