Module: MyTimeline

Defined in:
lib/my_timeline.rb,
lib/my_timeline/engine.rb,
lib/my_timeline/version.rb,
lib/my_timeline/user_stub.rb,
app/models/my_timeline/post.rb,
app/models/my_timeline/event.rb,
lib/my_timeline/settings_ext.rb,
app/helpers/my_timeline/events_helper.rb,
app/helpers/my_timeline/application_helper.rb,
app/presenters/my_timeline/event_presenter.rb,
app/controllers/my_timeline/posts_controller.rb,
lib/generators/my_timeline/install_generator.rb,
app/controllers/my_timeline/events_controller.rb,
app/controllers/my_timeline/control_panel_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, EventsHelper, Generators, SettingsExt Classes: ApplicationController, ControlPanelController, Engine, Event, EventPresenter, EventsController, Post, PostsController, UserStub

Constant Summary collapse

VERSION =
"0.1.0"
@@user_class =
'MyTimeline::UserStub'
@@user_slug =
:id
@@render_method =
'table'
@@use_bootstrap =
true
@@table_class =
"table table-striped"
@@time_formatter =
"%-l:%M %P - "
@@enabled_plugins =
Set.new

Class Method Summary collapse

Class Method Details

.register_plugin(plugin_name, options = {}) ⇒ Object



25
26
27
28
# File 'lib/my_timeline.rb', line 25

def self.register_plugin(plugin_name, options = {})
  MyTimeline.config_object.key plugin_name, options
  @@enabled_plugins << plugin_name
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (MyTimeline)

    the object that the method was called on



30
31
32
# File 'lib/my_timeline.rb', line 30

def self.setup
  yield self
end

.user_classObject



11
12
13
# File 'lib/my_timeline.rb', line 11

def self.user_class
  @@user_class.constantize
end