Class: Andromeda::Kit::FileReader

Inherits:
Plan show all
Defined in:
lib/andromeda/kit.rb

Direct Known Subclasses

Cmd::Reader, FileChunker

Instance Attribute Summary collapse

Attributes inherited from Plan

#error_level, #log, #marker, #nick, #trace_enter, #trace_exit

Attributes inherited from Impl::ProtoPlan

#guide, #id

Instance Method Summary collapse

Methods inherited from Plan

#initialize_copy, #pool, #tap, #to_short_s

Methods inherited from Impl::ProtoPlan

#>>, #current_name, #current_scope, #data_key, #data_val, #dest, #entry, #init_guide, #initialize_copy, #key_label, #key_spot, #map_data, #mute, name_spot, #post_data, #post_to, #public_spot, #selects?, #signal_name?, signal_names, #signal_names, signal_spot, spot_attr, #spot_attr_name?, #spot_attr_names, spot_attr_names, spot_meth, #spot_meth_name?, spot_meth_names, #spot_meth_names, #spot_name?, #spot_names, spot_names, #tags, #to_short_s, #via

Methods included from Impl::To_S

short_s, #to_s, #to_short_s

Methods inherited from Impl::ConnectorBase

#post, #post_local, #start

Constructor Details

#initialize(config = {}) ⇒ FileReader

Returns a new instance of FileReader.



136
137
138
139
# File 'lib/andromeda/kit.rb', line 136

def initialize(config = {})
  super config
  @mode ||= init_mode
end

Instance Attribute Details

#modeObject (readonly)

Returns the value of attribute mode.



134
135
136
# File 'lib/andromeda/kit.rb', line 134

def mode
  @mode
end

#pathObject (readonly)

Returns the value of attribute path.



133
134
135
# File 'lib/andromeda/kit.rb', line 133

def path
  @path
end

Instance Method Details

#data_tag(name, key, val, tags_in) ⇒ Object



141
142
143
144
145
146
# File 'lib/andromeda/kit.rb', line 141

def data_tag(name, key, val, tags_in)
  tags_out         = super
  tags_out[:first] = val.first rescue 0
  tags_out[:last]  = val.last rescue -1
  tags_out
end

#init_modeObject



148
# File 'lib/andromeda/kit.rb', line 148

def init_mode ; 'r' end