Class: Val::Message::Arrow

Inherits:
Object show all
Defined in:
lib/val.rb

Defined Under Namespace

Classes: Instance

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, &block) ⇒ Arrow

Returns a new instance of Arrow.



225
226
227
228
# File 'lib/val.rb', line 225

def initialize name, &block
  @name = name
  instance_exec &block if block_given?
end

Instance Attribute Details

#expected_outputObject (readonly)

Returns the value of attribute expected_output.



230
231
232
# File 'lib/val.rb', line 230

def expected_output
  @expected_output
end

#inputObject (readonly)

Returns the value of attribute input.



230
231
232
# File 'lib/val.rb', line 230

def input
  @input
end

#nameObject (readonly)

Returns the value of attribute name.



230
231
232
# File 'lib/val.rb', line 230

def name
  @name
end

Instance Method Details

#[](value) ⇒ Object



240
241
242
# File 'lib/val.rb', line 240

def [] value
  Instance.new self, value
end

#from(*all) ⇒ Object



232
233
234
# File 'lib/val.rb', line 232

def from *all
  @input = all
end

#to(one) ⇒ Object



236
237
238
# File 'lib/val.rb', line 236

def to one
  @expected_output = one
end