class Rodakase::Component
Constants
- IDENTIFIER_SEPARATOR
- PATH_SEPARATOR
Attributes
file[R]
identifier[R]
path[R]
Public Class Methods
identifier(input)
click to toggle source
# File lib/rodakase/component.rb, line 14 def self.identifier(input) input.gsub(PATH_SEPARATOR, IDENTIFIER_SEPARATOR) end
new(identifier, path)
click to toggle source
# File lib/rodakase/component.rb, line 22 def initialize(identifier, path) @identifier = identifier @path = path @file = "#{path}.rb" end
path(input)
click to toggle source
# File lib/rodakase/component.rb, line 18 def self.path(input) input.gsub(IDENTIFIER_SEPARATOR, PATH_SEPARATOR) end
Public Instance Methods
constant()
click to toggle source
# File lib/rodakase/component.rb, line 32 def constant Inflecto.constantize(name) end
instance(*args)
click to toggle source
# File lib/rodakase/component.rb, line 36 def instance(*args) constant.new(*args) end
name()
click to toggle source
# File lib/rodakase/component.rb, line 28 def name Inflecto.camelize(path) end