Class: Hermeneutics::Cli::ImapTools::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/hermeneutics/cli/imap/parser.rb

Defined Under Namespace

Classes: Compiler

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, *params) ⇒ Data

Returns a new instance of Data.



148
149
150
# File 'lib/hermeneutics/cli/imap/parser.rb', line 148

def initialize name, *params
  @name, @params = name, params
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



146
147
148
# File 'lib/hermeneutics/cli/imap/parser.rb', line 146

def name
  @name
end

#paramsObject (readonly)

Returns the value of attribute params.



146
147
148
# File 'lib/hermeneutics/cli/imap/parser.rb', line 146

def params
  @params
end

Instance Method Details

#stream_lines(r) {|[r]| ... } ⇒ Object

Yields:

  • ([r])


152
153
154
155
156
# File 'lib/hermeneutics/cli/imap/parser.rb', line 152

def stream_lines r, &block
  r << " " << @name.to_s
  add_to_stream r, @params, &block
  yield [r]
end