Class: Socialmux::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/socialmux/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/socialmux/result.rb', line 4

def method_missing(name, *args, &block)
  Event.all.each do |event_name|
    if name.to_s == "#{event_name}?"
      return event == event_name
    end
  end

  super
end

Instance Attribute Details

#eventObject

Returns the value of attribute event

Returns:

  • (Object)

    the current value of event



2
3
4
# File 'lib/socialmux/result.rb', line 2

def event
  @event
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



2
3
4
# File 'lib/socialmux/result.rb', line 2

def user
  @user
end