Class: Sample

Inherits:
GreenMidget::Base show all
Defined in:
lib/green_midget/extensions/sample.rb

Overview

Copyright © 2011, SoundCloud Ltd., Nikola Chochkov

This is a sample of how to define new features to be tracked by GreenMidget. Eg: define user features and check them on the message sender.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from GreenMidget::Base

#classify, #classify_as!

Constructor Details

#initialize(text, user) ⇒ Sample

Returns a new instance of Sample.



11
12
13
14
# File 'lib/green_midget/extensions/sample.rb', line 11

def initialize(text, user)
  @text = text
  @user = user
end

Instance Attribute Details

#userObject

Returns the value of attribute user.



9
10
11
# File 'lib/green_midget/extensions/sample.rb', line 9

def user
  @user
end