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

#>>, attr_spot, #attr_spot_name?, attr_spot_names, #attr_spot_names, #current_name, #current_scope, #data_key, #data_map, #data_val, #dest, #entry, #init_guide, #initialize_copy, #key_label, #key_spot, meth_spot, #meth_spot_name?, #meth_spot_names, meth_spot_names, #mute, name_spot, #post_data, #post_to, #public_spot, #selects?, #signal_name?, signal_names, #signal_names, signal_spot, #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.



116
117
118
119
# File 'lib/andromeda/kit.rb', line 116

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

Instance Attribute Details

#modeObject (readonly)

Returns the value of attribute mode.



114
115
116
# File 'lib/andromeda/kit.rb', line 114

def mode
  @mode
end

#pathObject (readonly)

Returns the value of attribute path.



113
114
115
# File 'lib/andromeda/kit.rb', line 113

def path
  @path
end

Instance Method Details

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



121
122
123
124
125
126
# File 'lib/andromeda/kit.rb', line 121

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



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

def init_mode ; 'r' end